From dba7c3c638124687ec7f64f85e1d4a34e2139b96 Mon Sep 17 00:00:00 2001 From: zhang-hai-feng Date: Fri, 28 Oct 2022 21:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85js=20api9=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhang-hai-feng --- api/@ohos.telephony.call.d.ts | 32 ++++++++++++++++++++-------- api/@ohos.telephony.radio.d.ts | 27 +++++++++++++++++++++--- api/@ohos.telephony.sim.d.ts | 38 ++++++++++++++++++++++++---------- 3 files changed, 74 insertions(+), 23 deletions(-) diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index 60ef25c819..4a5bb01d2f 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -331,20 +331,34 @@ declare namespace call { * @param type Indicates the observer type. * @param callback Return the result of MMI code. * @permission ohos.permission.SET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300004 - Do not have sim card. + * @throws {BusinessError} 8300999 - Unknown error code. * @systemapi Hide this for inner system use. * @since 9 */ function on(type: 'mmiCodeResult', callback: Callback): void; - /** - * Unobserve the result of MMI code - * - * @param type Indicates the observer type. - * @param callback Return the result of MMI code. - * @permission ohos.permission.SET_TELEPHONY_STATE - * @systemapi Hide this for inner system use. - * @since 9 - */ + /** + * Unobserve the result of MMI code + * + * @param type Indicates the observer type. + * @param callback Return the result of MMI code. + * @permission ohos.permission.SET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300004 - Do not have sim card. + * @throws {BusinessError} 8300999 - Unknown error code. + * @systemapi Hide this for inner system use. + * @since 9 + */ function off(type: 'mmiCodeResult', callback?: Callback): void; /** diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index 9f6d97f33a..75098eb1d8 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -307,6 +307,13 @@ declare namespace radio { * @param imsType Indicates the ims service type of the {@link ImsServiceType}. * @param callback including an instance of the {@link ImsRegInfo} class. * @permission ohos.permission.GET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300004 - Do not have sim card. + * @throws {BusinessError} 8300999 - Unknown error code. * @systemapi Hide this for inner system use. * @since 9 */ @@ -322,6 +329,13 @@ declare namespace radio { * @param imsType Indicates the ims service type of the {@link ImsServiceType}. * @param callback including an instance of the {@link ImsRegInfo} class. * @permission ohos.permission.GET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300004 - Do not have sim card. + * @throws {BusinessError} 8300999 - Unknown error code. * @systemapi Hide this for inner system use. * @since 9 */ @@ -330,6 +344,13 @@ declare namespace radio { /** * @permission ohos.permission.GET_TELEPHONY_STATE + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300004 - Do not have sim card. + * @throws {BusinessError} 8300999 - Unknown error code. * @systemapi Hide this for inner system use. * @since 9 */ @@ -837,7 +858,7 @@ declare namespace radio { IMS_UNREGISTERED, IMS_REGISTERED, } - + /** * @systemapi Hide this for inner system use. * @since 9 @@ -848,7 +869,7 @@ declare namespace radio { REGISTRATION_TECH_IWLAN, REGISTRATION_TECH_NR, } - + /** * @systemapi Hide this for inner system use. * @since 9 @@ -857,7 +878,7 @@ declare namespace radio { imsRegState: ImsRegState; imsRegTech: ImsRegTech; } - + /** * @systemapi Hide this for inner system use. * @since 9 diff --git a/api/@ohos.telephony.sim.d.ts b/api/@ohos.telephony.sim.d.ts index 8112beffed..0b269cb7ea 100644 --- a/api/@ohos.telephony.sim.d.ts +++ b/api/@ohos.telephony.sim.d.ts @@ -435,6 +435,14 @@ declare namespace sim { * * @param slotId Indicates the card slot index number, * ranging from 0 to the maximum card slot index number supported by the device. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300004 - Do not have sim card. + * @throws {BusinessError} 8300999 - Unknown error code. * @return Returns the opkey; returns an empty string if no SIM card is inserted or * no opkey matched. * @since 9 @@ -442,17 +450,25 @@ declare namespace sim { function getOpKey(slotId: number, callback: AsyncCallback): void; function getOpKey(slotId: number): Promise; - /** - * Obtains the opname of the SIM card in a specified slot. - * - * @param slotId Indicates the card slot index number, - * ranging from 0 to the maximum card slot index number supported by the device. - * @return Returns the opname; returns an empty string if no SIM card is inserted or - * no opname matched. - * @since 9 - */ - function getOpName(slotId: number, callback: AsyncCallback): void; - function getOpName(slotId: number): Promise; + /** + * Obtains the opname of the SIM card in a specified slot. + * + * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. + * @throws {BusinessError} 201 - Permission denied. + * @throws {BusinessError} 401 - Parameter error. + * @throws {BusinessError} 801 - Capability not supported. + * @throws {BusinessError} 8300001 - Invalid parameter value. + * @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service. + * @throws {BusinessError} 8300003 - System internal error. + * @throws {BusinessError} 8300004 - Do not have sim card. + * @throws {BusinessError} 8300999 - Unknown error code. + * @return Returns the opname; returns an empty string if no SIM card is inserted or + * no opname matched. + * @since 9 + */ + function getOpName(slotId: number, callback: AsyncCallback): void; + function getOpName(slotId: number): Promise; /** * @systemapi Hide this for inner system use. -- Gitee