Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c50be40e authored by arunvoddu's avatar arunvoddu Committed by Arun kumar Voddu
Browse files

Interface for PSI-SMSC value from UICC

Bug: 229066443
Test: Done with manual and atest verification
Change-Id: I1bbcb4513396920f1254563ebe70635319fbee8c
parent c58e4395
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -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;
    }
}
+14 −0
Original line number Diff line number Diff line
@@ -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);
}