diff --git a/api/@ohos.telephony.radio.d.ts b/api/@ohos.telephony.radio.d.ts index 6c15700681d72bad69ebcd75f15e3b33db20b47a..2525430029ef1c548054f2fff1cdeb921f44321e 100644 --- a/api/@ohos.telephony.radio.d.ts +++ b/api/@ohos.telephony.radio.d.ts @@ -297,6 +297,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 @@ -790,6 +826,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; diff --git a/api/@ohos.telephony.sim.d.ts b/api/@ohos.telephony.sim.d.ts index 475772a1af5de4499f2b86a86c88e9b4691d002a..7e3d87ff684255067e2e99fea96f472741cf0da1 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 */