From e4ed4872e175306c6c5eeebcabea9d50359a53eb Mon Sep 17 00:00:00 2001 From: dingxiaochen Date: Mon, 19 Sep 2022 10:47:42 +0800 Subject: [PATCH] add sync js api Signed-off-by: dingxiaochen --- api/@ohos.telephony.data.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/@ohos.telephony.data.d.ts b/api/@ohos.telephony.data.d.ts index a82b90e3dd..1ca3ce823f 100644 --- a/api/@ohos.telephony.data.d.ts +++ b/api/@ohos.telephony.data.d.ts @@ -31,6 +31,17 @@ declare namespace data { function getDefaultCellularDataSlotId(callback: AsyncCallback): void; function getDefaultCellularDataSlotId(): Promise; + /** + * Checks whether cellular data services are enabled. + * + *

Requires Permission: {@code ohos.permission.GET_NETWORK_INFO}. + * + * @return Returns default cellular data slot id. + * @permission ohos.permission.GET_NETWORK_INFO + * @since 9 + */ + function getDefaultCellularDataSlotIdSync(): number; + /** * Switches cellular data services to another card, without changing the default settings. * -- Gitee