From a64df2602deb49facb920f44e4d8ad414a42755b Mon Sep 17 00:00:00 2001 From: clevercong Date: Mon, 21 Feb 2022 17:18:50 +0800 Subject: [PATCH 1/2] update syscap. Signed-off-by: clevercong --- api/@ohos.net.connection.d.ts | 2 +- api/@ohos.net.http.d.ts | 2 +- api/@ohos.net.socket.d.ts | 2 +- api/@ohos.net.statistics.d.ts | 2 +- api/@ohos.telephony.call.d.ts | 2 +- api/@ohos.telephony.data.d.ts | 2 +- api/@ohos.telephony.observer.d.ts | 2 +- api/@ohos.telephony.radio.d.ts | 2 +- api/@ohos.telephony.sim.d.ts | 2 +- api/@ohos.telephony.sms.d.ts | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/@ohos.net.connection.d.ts b/api/@ohos.net.connection.d.ts index 2099f741b1..3ff974a755 100644 --- a/api/@ohos.net.connection.d.ts +++ b/api/@ohos.net.connection.d.ts @@ -21,7 +21,7 @@ import socket from "./@ohos.net.socket"; * Provides interfaces to manage and use data networks. * * @since 8 - * @sysCap SystemCapability.Communication.NetManager.Core + * @syscap SystemCapability.Communication.NetManager.Core */ declare namespace connection { type HttpRequest = http.HttpRequest; diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts index 8e5a182da1..9d555afdde 100644 --- a/api/@ohos.net.http.d.ts +++ b/api/@ohos.net.http.d.ts @@ -19,7 +19,7 @@ import {AsyncCallback, Callback} from "./basic"; * Provides http related APIs. * * @since 6 - * @sysCap SystemCapability.Communication.NetStack + * @syscap SystemCapability.Communication.NetStack */ declare namespace http { /** diff --git a/api/@ohos.net.socket.d.ts b/api/@ohos.net.socket.d.ts index 61d4ea4165..ccabf9041a 100644 --- a/api/@ohos.net.socket.d.ts +++ b/api/@ohos.net.socket.d.ts @@ -20,7 +20,7 @@ import connection from "./@ohos.net.connection"; * Provides TCP and UDP Socket APIs. * * @since 7 - * @sysCap SystemCapability.Communication.NetStack + * @syscap SystemCapability.Communication.NetStack */ declare namespace socket { export import NetAddress = connection.NetAddress; diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts index 3b53cec6ab..9f1446839d 100644 --- a/api/@ohos.net.statistics.d.ts +++ b/api/@ohos.net.statistics.d.ts @@ -19,7 +19,7 @@ import {AsyncCallback, Callback} from "./basic"; * Obtains traffic statistics. * * @since 8 - * @sysCap SystemCapability.Communication.NetManager.Core + * @syscap SystemCapability.Communication.NetManager.Core */ declare namespace statistics { /** diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index 6450e8c35c..164377c6f4 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -19,7 +19,7 @@ import {AsyncCallback, Callback} from "./basic"; * Provides methods related to call management. * * @since 6 - * @sysCap SystemCapability.Telephony.CallManager + * @syscap SystemCapability.Telephony.CallManager */ declare namespace call { /** diff --git a/api/@ohos.telephony.data.d.ts b/api/@ohos.telephony.data.d.ts index e589ee35d1..24a6fa7556 100644 --- a/api/@ohos.telephony.data.d.ts +++ b/api/@ohos.telephony.data.d.ts @@ -19,7 +19,7 @@ import {AsyncCallback} from "./basic"; * Provides methods related to cellular data services. * * @since 7 - * @sysCap SystemCapability.Telephony.CellularData + * @syscap SystemCapability.Telephony.CellularData */ declare namespace data { /** diff --git a/api/@ohos.telephony.observer.d.ts b/api/@ohos.telephony.observer.d.ts index 7a99d89d06..e7d6294044 100644 --- a/api/@ohos.telephony.observer.d.ts +++ b/api/@ohos.telephony.observer.d.ts @@ -24,7 +24,7 @@ import sim from "./@ohos.telephony.sim"; * signal strength, call state, the data link connection state and others. * * @since 6 - * @sysCap SystemCapability.Telephony.StateRegistry + * @syscap SystemCapability.Telephony.StateRegistry */ declare namespace observer { type NetworkState = radio.NetworkState; diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index e0377c0328..cae3d90ff7 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -21,7 +21,7 @@ import {AsyncCallback} from "./basic"; * listen for changes of the network, cell, and signal status of the WCN. * * @since 6 - * @sysCap SystemCapability.Telephony.CoreService + * @syscap SystemCapability.Telephony.CoreService */ declare namespace radio { /** diff --git a/api/@ohos.telephony.sim.d.ts b/api/@ohos.telephony.sim.d.ts index 5cd23a7296..35b4253181 100644 --- a/api/@ohos.telephony.sim.d.ts +++ b/api/@ohos.telephony.sim.d.ts @@ -20,7 +20,7 @@ import {AsyncCallback} from "./basic"; * SIM cards include SIM, USIM, and CSIM cards. * * @since 6 - * @sysCap SystemCapability.Telephony.CoreService + * @syscap SystemCapability.Telephony.CoreService */ declare namespace sim { /** diff --git a/api/@ohos.telephony.sms.d.ts b/api/@ohos.telephony.sms.d.ts index 940e63150d..2a18155c13 100644 --- a/api/@ohos.telephony.sms.d.ts +++ b/api/@ohos.telephony.sms.d.ts @@ -19,7 +19,7 @@ import {AsyncCallback} from "./basic"; * Provides the capabilities and methods for obtaining Short Message Service (SMS) management objects. * * @since 6 - * @sysCap SystemCapability.Telephony.SmsMms + * @syscap SystemCapability.Telephony.SmsMms */ declare namespace sms { /** -- Gitee From 8515cf3909547e34b8e58f70515f2fb8084e1fb9 Mon Sep 17 00:00:00 2001 From: clevercong Date: Tue, 22 Feb 2022 09:47:58 +0800 Subject: [PATCH 2/2] add hasVoiceCap api. Signed-off-by: clevercong --- api/@ohos.telephony.call.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index 164377c6f4..7b5a03dd61 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -72,6 +72,18 @@ declare namespace call { function muteRinger(callback: AsyncCallback): void; function muteRinger(): Promise; + /** + * Checks whether a device supports voice calls. + * + *

The system checks whether the device has the capability to initiate a circuit switching (CS) or IP multimedia + * subsystem domain (IMS) call on a telephone service network. If the device supports only packet switching + * (even if the device supports OTT calls), {@code false} is returned. + * + * @return Returns {@code true} if the device supports voice calls; returns {@code false} otherwise. + * @since 7 + */ + function hasVoiceCapability(): boolean; + /** * Checks whether a phone number is on the emergency number list. * -- Gitee