From 554adcf37ec85a2d2255c9ec883f4f092f2d0e66 Mon Sep 17 00:00:00 2001 From: huangyufei Date: Fri, 9 Sep 2022 14:54:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ts=E6=96=87=E4=BB=B6=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.contact.d.ts | 2 +- api/@ohos.telephony.radio.d.ts | 81 +++++++++++++++++++++++++++++++++- api/@ohos.telephony.sim.d.ts | 4 +- 3 files changed, 82 insertions(+), 5 deletions(-) diff --git a/api/@ohos.contact.d.ts b/api/@ohos.contact.d.ts index b286bac943..3570dc1a02 100644 --- a/api/@ohos.contact.d.ts +++ b/api/@ohos.contact.d.ts @@ -39,7 +39,7 @@ declare namespace contact { * * @return Returns the contact list which user select; * returns empty contact list if user not select. - * @syscap SystemCapability.Applications.ContactsData, SystemCapability.Applications.Contacts + * @syscap SystemCapability.Applications.ContactsData * @permission ohos.permission.READ_CONTACTS */ function selectContact(callback: AsyncCallback>): void; diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index 0975e3245b..17d6cf4a61 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -71,7 +71,8 @@ declare namespace radio { * @since 8 */ function sendUpdateCellLocationRequest(callback: AsyncCallback): void; - function sendUpdateCellLocationRequest(): Promise; + function sendUpdateCellLocationRequest(slotId: number, callback: AsyncCallback): void; + function sendUpdateCellLocationRequest(slotId?: number): Promise; /** * @permission ohos.permission.LOCATION @@ -285,6 +286,42 @@ declare namespace radio { function getPreferredNetwork(slotId: number, callback: AsyncCallback): void; function getPreferredNetwork(slotId: number): Promise; + /** + * Get the IMS registration state info of specificed IMS service type. + * + * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. + * @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 + * @systemapi Hide this for inner system use. + * @since 9 + */ + function getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback): void; + function getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise; + + /** + * Called when the IMS registration state of specificed IMS service type corresponding + * to a monitored {@code slotId} updates. + * + * @param slotId Indicates the card slot index number, + * ranging from 0 to the maximum card slot index number supported by the device. + * @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 + * @systemapi Hide this for inner system use. + * @since 9 + */ + function on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: Callback): void; + + + /** + * @permission ohos.permission.GET_TELEPHONY_STATE + * @systemapi Hide this for inner system use. + * @since 9 + */ + function off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback?: Callback): void; + /** * @systemapi Hide this for inner system use. * @since 8 @@ -778,6 +815,46 @@ declare namespace radio { /** Manual network selection modes. */ NETWORK_SELECTION_MANUAL } + + /** + * @systemapi Hide this for inner system use. + * @since 9 + */ + export enum ImsRegState { + IMS_UNREGISTERED, + IMS_REGISTERED, + } + + /** + * @systemapi Hide this for inner system use. + * @since 9 + */ + export enum ImsRegTech { + REGISTRATION_TECH_NONE, + REGISTRATION_TECH_LTE, + REGISTRATION_TECH_IWLAN, + REGISTRATION_TECH_NR, + } + + /** + * @systemapi Hide this for inner system use. + * @since 9 + */ + export interface ImsRegInfo { + imsRegState: ImsRegState; + imsRegTech: ImsRegTech; + } + + /** + * @systemapi Hide this for inner system use. + * @since 9 + */ + export enum ImsServiceType { + TYPE_VOICE, + TYPE_VIDEO, + TYPE_UT, + TYPE_SMS, + } } -export default radio; \ No newline at end of file +export default radio; diff --git a/api/@ohos.telephony.sim.d.ts b/api/@ohos.telephony.sim.d.ts index 475772a1af..7e3d87ff68 100644 --- a/api/@ohos.telephony.sim.d.ts +++ b/api/@ohos.telephony.sim.d.ts @@ -434,7 +434,7 @@ 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. - * @return Returns the opkey; returns "-1" if no SIM card is inserted or + * @return Returns the opkey; returns an empty string if no SIM card is inserted or * no opkey matched. * @since 9 */ @@ -446,7 +446,7 @@ 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. - * @return Returns the opname; returns null if no SIM card is inserted or + * @return Returns the opname; returns an empty string if no SIM card is inserted or * no opname matched. * @since 9 */ -- Gitee From 36e6e125616c659663eba672b4ac8f22a4584ffc Mon Sep 17 00:00:00 2001 From: huangyufei Date: Fri, 16 Sep 2022 11:26:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=96=E6=B6=88sendUpdateCellLocationReq?= =?UTF-8?q?uest=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.telephony.radio.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index 17d6cf4a61..c856fbea4e 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -71,8 +71,7 @@ declare namespace radio { * @since 8 */ function sendUpdateCellLocationRequest(callback: AsyncCallback): void; - function sendUpdateCellLocationRequest(slotId: number, callback: AsyncCallback): void; - function sendUpdateCellLocationRequest(slotId?: number): Promise; + function sendUpdateCellLocationRequest(): Promise; /** * @permission ohos.permission.LOCATION -- Gitee