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

Commit cad78a80 authored by Junda Liu's avatar Junda Liu Committed by Android (Google) Code Review
Browse files

Merge "Add getCdmaMdn and getCdmaMin as system api to telmgr." into lmp-dev

parents 7cb10ac3 2b2469b0
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -3054,6 +3054,42 @@ public class TelephonyManager {
     * Expose the rest of ITelephony to @SystemApi
     */

    /** @hide */
    @SystemApi
    public String getCdmaMdn() {
        return getCdmaMdn(getDefaultSubscription());
    }

    /** @hide */
    @SystemApi
    public String getCdmaMdn(long subId) {
        try {
            return getITelephony().getCdmaMdn(subId);
        } catch (RemoteException ex) {
            return null;
        } catch (NullPointerException ex) {
            return null;
        }
    }

    /** @hide */
    @SystemApi
    public String getCdmaMin() {
        return getCdmaMin(getDefaultSubscription());
    }

    /** @hide */
    @SystemApi
    public String getCdmaMin(long subId) {
        try {
            return getITelephony().getCdmaMin(subId);
        } catch (RemoteException ex) {
            return null;
        } catch (NullPointerException ex) {
            return null;
        }
    }

    /** @hide */
    @SystemApi
    public int checkCarrierPrivilegesForPackage(String pkgname) {
+12 −0
Original line number Diff line number Diff line
@@ -676,6 +676,18 @@ interface ITelephony {
     */
    void setImsRegistrationState(boolean registered);

    /**
     * Return MDN string for CDMA phone.
     * @param subId user preferred subId.
     */
    String getCdmaMdn(long subId);

    /**
     * Return MIN string for CDMA phone.
     * @param subId user preferred subId.
     */
    String getCdmaMin(long subId);

    /**
     * Has the calling application been granted special privileges by the carrier.
     *