提交 a81c390a 编写于 作者: F fangJinliang1

fix docs

Signed-off-by: NfangJinliang1 <fangjinliang1@huawei.com>
Change-Id: I97c31908c0837fc8d6da75c0746c6002ffc9e3cc
Signed-off-by: NfangJinliang1 <fangjinliang1@huawei.com>
上级 ad7b04f3
......@@ -16,7 +16,7 @@ import WantAgent from '@ohos.app.ability.wantAgent';
getWantAgent(info: WantAgentInfo, callback: AsyncCallback\<WantAgent\>): void
创建WantAgent(callback形式)。
创建WantAgent(callback形式)。 创建失败返回的WantAgent为空值。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
......@@ -108,7 +108,7 @@ try {
getWantAgent(info: WantAgentInfo): Promise\<WantAgent\>
创建WantAgent(Promise形式)。
创建WantAgent(Promise形式)。 创建失败返回的WantAgent为空值。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
......
......@@ -2301,9 +2301,9 @@ notificationManager.getDoNotDisturbDate(userId).then((data) => {
```
## notificationManager.supportDoNotDisturbMode
## notificationManager.isSupportDoNotDisturbMode
supportDoNotDisturbMode(callback: AsyncCallback\<boolean\>): void
isSupportDoNotDisturbMode(callback: AsyncCallback\<boolean\>): void
查询是否支持免打扰功能(Callback形式)。
......@@ -2330,20 +2330,20 @@ supportDoNotDisturbMode(callback: AsyncCallback\<boolean\>): 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\<boolean\>
isSupportDoNotDisturbMode(): Promise\<boolean\>
查询是否支持勿扰模式功能(Promise形式)。
......@@ -2370,7 +2370,7 @@ supportDoNotDisturbMode(): Promise\<boolean\>
**示例:**
```ts
notificationManager.supportDoNotDisturbMode().then((data) => {
notificationManager.isSupportDoNotDisturbMode().then((data) => {
console.info("supportDoNotDisturbMode success, data: " + JSON.stringify(data));
});
```
......
......@@ -16,7 +16,7 @@ import WantAgent from '@ohos.wantAgent';
getWantAgent(info: WantAgentInfo, callback: AsyncCallback\<WantAgent\>): void
创建WantAgent(callback形式)。
创建WantAgent(callback形式)。 创建失败返回的WantAgent为空值。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
......@@ -75,7 +75,7 @@ WantAgent.getWantAgent(wantAgentInfo, getWantAgentCallback);
getWantAgent(info: WantAgentInfo): Promise\<WantAgent\>
创建WantAgent(Promise形式)。
创建WantAgent(Promise形式)。 创建失败返回的WantAgent为空值。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
......
# ANS通知子系统ChangeLog
## cl.notificationManager.1 接口名变更
基于此前接口名定义不够规范,与其他功能类型的接口命名不一致,对此接口名进行变更。
**变更影响**
底层仍支持原接口功能,不影响4.0.2.3版本调用该接口的应用。
**关键接口/组件变更**
| 包名 | 旧接口 | 新接口 |
| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| ohos.notificationManager.d.ts | **function** supportDoNotDisturbMode(callback: AsyncCallback<boolean>): **void**; | **function** isSupportDoNotDisturbMode(callback: AsyncCallback<boolean>): **void**; |
| ohos.notificationManager.d.ts | **function** supportDoNotDisturbMode(): Promise<boolean>; | **function** isSupportDoNotDisturbMode(): Promise<boolean>; |
**适配指导**
按新的接口isSupportDoNotDisturbMode调用。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册