Interface for PSI-SMSC value from UICC

Bug: 229066443
Test: Done with manual and atest verification
Change-Id: I1bbcb4513396920f1254563ebe70635319fbee8c
This commit is contained in:
arunvoddu
2022-06-17 11:44:45 +00:00
committed by Arun kumar Voddu
parent c58e4395ae
commit c50be40eeb
2 changed files with 45 additions and 0 deletions

View File

@@ -17069,4 +17069,35 @@ public class TelephonyManager {
}
return false;
}
/**
* Fetches the EFPSISMSC value from the SIM that contains the Public Service Identity
* of the SM-SC (either a SIP URI or tel URI), the value is common for both appType
* {@link #APPTYPE_ISIM} and {@link #APPTYPE_SIM}.
* The EFPSISMSC value is used by the ME to submit SMS over IP as defined in 24.341 [55].
*
* @param appType ICC Application type {@link #APPTYPE_ISIM} or {@link #APPTYPE_USIM}
* @return SIP URI or tel URI of the Public Service Identity of the SM-SC
* @throws SecurityException if the caller does not have the required permission/privileges
* @hide
*/
@NonNull
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
@RequiresFeature(PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION)
public String getSmscIdentity(int appType) {
try {
IPhoneSubInfo info = getSubscriberInfoService();
if (info == null) {
Rlog.e(TAG, "getSmscIdentity(): IPhoneSubInfo instance is NULL");
return null;
}
/** Fetches the SIM PSISMSC params based on subId and appType */
return info.getSmscIdentity(getSubId(), appType);
} catch (RemoteException ex) {
Rlog.e(TAG, "getSmscIdentity(): RemoteException: " + ex.getMessage());
} catch (NullPointerException ex) {
Rlog.e(TAG, "getSmscIdentity(): NullPointerException: " + ex.getMessage());
}
return null;
}
}

View File

@@ -218,4 +218,18 @@ interface IPhoneSubInfo {
*/
String getIccSimChallengeResponse(int subId, int appType, int authType, String data,
String callingPackage, String callingFeatureId);
/**
* Fetches the EFPSISMSC value from the SIM that contains the Public Service Identity
* of the SM-SC (either a SIP URI or tel URI), the value is common for both appType
* {@link #APPTYPE_ISIM} and {@link #APPTYPE_SIM}.
* The EFPSISMSC value is used by the ME to submit SMS over IP as defined in 24.341 [55].
*
* @param appType ICC Application type {@link #APPTYPE_ISIM} or {@link #APPTYPE_USIM}
* @return SIP URI or tel URI of the Public Service Identity of the SM-SC
* @throws SecurityException if the caller does not have the required permission/privileges
* @hide
*/
@JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)")
String getSmscIdentity(int subId, int appType);
}