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

Commit 18b925a7 authored by Chen Xu's avatar Chen Xu Committed by Gerrit Code Review
Browse files

Merge "expose Carrier Id related APIs"

parents d0c404cb 64c1d764
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -37330,10 +37330,13 @@ package android.provider {
  }
  public static final class Telephony.CarrierId implements android.provider.BaseColumns {
    method public static android.net.Uri getPreciseCarrierIdUriForSubscriptionId(int);
    method public static android.net.Uri getUriForSubscriptionId(int);
    field public static final java.lang.String CARRIER_ID = "carrier_id";
    field public static final java.lang.String CARRIER_NAME = "carrier_name";
    field public static final android.net.Uri CONTENT_URI;
    field public static final java.lang.String PRECISE_CARRIER_ID = "precise_carrier_id";
    field public static final java.lang.String PRECISE_CARRIER_ID_NAME = "precise_carrier_id_name";
  }
  public static final class Telephony.Carriers implements android.provider.BaseColumns {
@@ -39458,13 +39461,16 @@ package android.service.carrier {
  public class CarrierIdentifier implements android.os.Parcelable {
    ctor public CarrierIdentifier(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    ctor public CarrierIdentifier(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, int);
    ctor public CarrierIdentifier(byte[], java.lang.String, java.lang.String);
    method public int describeContents();
    method public int getCarrierId();
    method public java.lang.String getGid1();
    method public java.lang.String getGid2();
    method public java.lang.String getImsi();
    method public java.lang.String getMcc();
    method public java.lang.String getMnc();
    method public int getPreciseCarrierId();
    method public java.lang.String getSpn();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.service.carrier.CarrierIdentifier> CREATOR;
@@ -42960,6 +42966,7 @@ package android.telephony {
    method public java.util.List<android.telephony.CellInfo> getAllCellInfo();
    method public int getCallState();
    method public android.os.PersistableBundle getCarrierConfig();
    method public int getCarrierIdFromSimMccMnc();
    method public deprecated android.telephony.CellLocation getCellLocation();
    method public java.util.Map<java.lang.Integer, java.util.List<android.telephony.emergency.EmergencyNumber>> getCurrentEmergencyNumberList();
    method public java.util.Map<java.lang.Integer, java.util.List<android.telephony.emergency.EmergencyNumber>> getCurrentEmergencyNumberList(int);
@@ -42997,6 +43004,8 @@ package android.telephony {
    method public java.lang.String getSimCountryIso();
    method public java.lang.String getSimOperator();
    method public java.lang.String getSimOperatorName();
    method public int getSimPreciseCarrierId();
    method public java.lang.CharSequence getSimPreciseCarrierIdName();
    method public java.lang.String getSimSerialNumber();
    method public int getSimState();
    method public int getSimState(int);
@@ -43052,6 +43061,7 @@ package android.telephony {
    field public static final java.lang.String ACTION_SECRET_CODE = "android.telephony.action.SECRET_CODE";
    field public static final java.lang.String ACTION_SHOW_VOICEMAIL_NOTIFICATION = "android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION";
    field public static final java.lang.String ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED = "android.telephony.action.SUBSCRIPTION_CARRIER_IDENTITY_CHANGED";
    field public static final java.lang.String ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED = "android.telephony.action.SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED";
    field public static final int APPTYPE_CSIM = 4; // 0x4
    field public static final int APPTYPE_ISIM = 5; // 0x5
    field public static final int APPTYPE_RUIM = 3; // 0x3
@@ -43084,6 +43094,8 @@ package android.telephony {
    field public static final java.lang.String EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT = "android.telephony.extra.LAUNCH_VOICEMAIL_SETTINGS_INTENT";
    field public static final java.lang.String EXTRA_NOTIFICATION_COUNT = "android.telephony.extra.NOTIFICATION_COUNT";
    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telephony.extra.PHONE_ACCOUNT_HANDLE";
    field public static final java.lang.String EXTRA_PRECISE_CARRIER_ID = "android.telephony.extra.PRECISE_CARRIER_ID";
    field public static final java.lang.String EXTRA_PRECISE_CARRIER_NAME = "android.telephony.extra.PRECISE_CARRIER_NAME";
    field public static final java.lang.String EXTRA_STATE = "state";
    field public static final java.lang.String EXTRA_STATE_IDLE;
    field public static final java.lang.String EXTRA_STATE_OFFHOOK;
+6 −8
Original line number Diff line number Diff line
@@ -71,10 +71,8 @@ public class CarrierIdentifier implements Parcelable {
     * @param gid2 group id level 2
     * @param carrierid carrier unique identifier {@link TelephonyManager#getSimCarrierId()}, used
     *                  to uniquely identify the carrier and look up the carrier configurations.
     * @param preciseCarrierId precise carrier identifier {@link TelephonyManager#getSimPreciseCarrierId()}
     * @hide
     *
     * TODO: expose this to public API
     * @param preciseCarrierId precise carrier identifier
     * {@link TelephonyManager#getSimPreciseCarrierId()}
     */
    public CarrierIdentifier(String mcc, String mnc, @Nullable String spn,
                             @Nullable String imsi, @Nullable String gid1, @Nullable String gid2,
@@ -155,16 +153,16 @@ public class CarrierIdentifier implements Parcelable {
    }

    /**
     * Get the carrier id {@link TelephonyManager#getSimCarrierId() }
     * @hide
     * Returns the carrier id.
     * @see TelephonyManager#getSimCarrierId()
     */
    public int getCarrierId() {
        return mCarrierId;
    }

    /**
     * Get the precise carrier id {@link TelephonyManager#getSimPreciseCarrierId()}
     * @hide
     * Returns the precise carrier id.
     * @see TelephonyManager#getSimPreciseCarrierId()
     */
    public int getPreciseCarrierId() {
        return mPreciseCarrierId;
+9 −23
Original line number Diff line number Diff line
@@ -3577,8 +3577,9 @@ public final class Telephony {

        /**
         * Generates a content {@link Uri} used to receive updates on precise carrier identity
         * change on the given subscriptionId
         * {@link TelephonyManager#ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED}.
         * change on the given subscriptionId returned by
         * {@link TelephonyManager#getSimPreciseCarrierId()}.
         * @see TelephonyManager#ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED
         * <p>
         * Use this {@link Uri} with a {@link ContentObserver} to be notified of changes to the
         * precise carrier identity {@link TelephonyManager#getSimPreciseCarrierId()}
@@ -3589,7 +3590,6 @@ public final class Telephony {
         *
         * @param subscriptionId the subscriptionId to receive updates on
         * @return the Uri used to observe precise carrier identity changes
         * @hide
         */
        public static Uri getPreciseCarrierIdUriForSubscriptionId(int subscriptionId) {
            return Uri.withAppendedPath(Uri.withAppendedPath(CONTENT_URI, "precise"),
@@ -3611,22 +3611,20 @@ public final class Telephony {
        public static final String CARRIER_ID = "carrier_id";

        /**
         * A user facing carrier name for precise carrier id.
         * @see TelephonyManager#getSimPreciseCarrierIdName()
         * A fine-grained carrier id.
         * @see TelephonyManager#getSimPreciseCarrierId()
         * This is not a database column, only used to notify content observers for
         * {@link #getPreciseCarrierIdUriForSubscriptionId(int)}
         * @hide
         */
        public static final String PRECISE_CARRIER_ID_NAME = "precise_carrier_id_name";
        public static final String PRECISE_CARRIER_ID = "precise_carrier_id";

        /**
         * A fine-grained carrier id.
         * @see TelephonyManager#getSimPreciseCarrierId()
         * A user facing carrier name for precise carrier id {@link #PRECISE_CARRIER_ID}.
         * @see TelephonyManager#getSimPreciseCarrierIdName()
         * This is not a database column, only used to notify content observers for
         * {@link #getPreciseCarrierIdUriForSubscriptionId(int)}
         * @hide
         */
        public static final String PRECISE_CARRIER_ID = "precise_carrier_id";
        public static final String PRECISE_CARRIER_ID_NAME = "precise_carrier_id_name";

        /**
         * A unique parent carrier id. The parent-child
@@ -3639,18 +3637,6 @@ public final class Telephony {
         */
        public static final String PARENT_CARRIER_ID = "parent_carrier_id";

        /**
         * A unique mno carrier id. mno carrier shares the same {@link All#MCCMNC} as carrier id
         * and can be solely identified by {@link All#MCCMNC} only. If there is no such mno
         * carrier, then mno carrier id equals to {@link #CARRIER_ID carrier id}.
         *
         * <p>mno carrier id can be used as fallback id. When the exact carrier id configurations
         * are not found, usually fall back to its mno carrier id.
         * <P>Type: INTEGER </P>
         * @hide
         */
        public static final String MNO_CARRIER_ID = "mno_carrier_id";

        /**
         * Contains mappings between matching rules with carrier id for all carriers.
         * @hide
+7 −1
Original line number Diff line number Diff line
@@ -68,7 +68,13 @@ public class CarrierConfigManager {
     * This intent is broadcast by the system when carrier config changes. An int is specified in
     * {@link #EXTRA_SLOT_INDEX} to indicate the slot index that this is for. An optional int extra
     * {@link #EXTRA_SUBSCRIPTION_INDEX} is included to indicate the subscription index if a valid
     * one is available for the slot index.
     * one is available for the slot index. An optional int extra
     * {@link TelephonyManager#EXTRA_CARRIER_ID} is included to indicate the carrier id for the
     * changed carrier configuration. An optional int extra
     * {@link TelephonyManager#EXTRA_PRECISE_CARRIER_ID} is included to indicate the precise
     * carrier id for the changed carrier configuration.
     * @see TelephonyManager#getSimCarrierId()
     * @see TelephonyManager#getSimPreciseCarrierId()
     */
    public static final String
            ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
+99 −91
Original line number Diff line number Diff line
@@ -1222,82 +1222,80 @@ public class TelephonyManager {
    public static final String ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED =
            "android.telephony.action.SUBSCRIPTION_CARRIER_IDENTITY_CHANGED";

    /**
     * An int extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which indicates
     * the updated carrier id returned by {@link TelephonyManager#getSimCarrierId()}.
     * <p>Will be {@link TelephonyManager#UNKNOWN_CARRIER_ID} if the subscription is unavailable or
     * the carrier cannot be identified.
     */
    public static final String EXTRA_CARRIER_ID = "android.telephony.extra.CARRIER_ID";

    /**
     * An string extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which
     * indicates the updated carrier name of the current subscription.
     * @see TelephonyManager#getSimCarrierIdName()
     * <p>Carrier name is a user-facing name of the carrier id {@link #EXTRA_CARRIER_ID},
     * usually the brand name of the subsidiary (e.g. T-Mobile).
     */
    public static final String EXTRA_CARRIER_NAME = "android.telephony.extra.CARRIER_NAME";

    /**
     * Broadcast Action: The subscription precise carrier identity has changed.
     * Similar like {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED}, this intent will be sent
     * on the event of {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED}. However, its possible
     * that precise carrier identity changes while
     * {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} remains the same e.g, the same
     * subscription switches to different IMSI could potentially change its precise carrier id.
     * The precise carrier id can be used to further differentiate a carrier by different
     * networks, by prepaid v.s.postpaid or even by 4G v.s.3G plan. Each carrier has a unique
     * carrier id returned by {@link #getSimCarrierId()} but could have multiple precise carrier id.
     * e.g, {@link #getSimCarrierId()} will always return Tracfone (id 2022) for a Tracfone SIM,
     * while {@link #getSimPreciseCarrierId()} can return Tracfone AT&T or Tracfone T-Mobile based
     * on the current subscription IMSI. For carriers without any fine-grained ids, precise carrier
     * id is same as carrier id.
     *
     * <p>Similar like {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED}, this intent will be
     * sent on the event of {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} while its also
     * possible to be sent without {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} when
     * precise carrier id changes with the same carrier id.
     * e.g, the same subscription switches to different IMSI could potentially change its
     * precise carrier id while carrier id remains the same.
     * @see #getSimPreciseCarrierId()
     * @see #getSimCarrierId()
     *
     * The intent will have the following extra values:
     * <ul>
     *   <li>{@link #EXTRA_PRECISE_CARRIER_ID} The up-to-date precise carrier id of the
     *   current subscription.
     *   </li>
     *   <li>{@link #EXTRA_PRECISE_CARRIER_NAME} The up-to-date carrier name of the current
     *   subscription.
     *   <li>{@link #EXTRA_PRECISE_CARRIER_NAME} The up-to-date name of the precise carrier id.
     *   </li>
     *   <li>{@link #EXTRA_SUBSCRIPTION_ID} The subscription id associated with the changed carrier
     *   identity.
     *   </li>
     * </ul>
     * <p class="note">This is a protected intent that can only be sent by the system.
     * @hide
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED =
            "android.telephony.action.SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED";

    /**
     * An int extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which indicates
     * the updated carrier id {@link TelephonyManager#getSimCarrierId()} of
     * the current subscription.
     * <p>Will be {@link TelephonyManager#UNKNOWN_CARRIER_ID} if the subscription is unavailable or
     * the carrier cannot be identified.
     */
    public static final String EXTRA_CARRIER_ID = "android.telephony.extra.CARRIER_ID";

    /**
     * An int extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which indicates
     * the updated mno carrier id of the current subscription.
     * <p>Will be {@link TelephonyManager#UNKNOWN_CARRIER_ID} if the subscription is unavailable or
     * the carrier cannot be identified.
     *
     *@hide
     */
    public static final String EXTRA_MNO_CARRIER_ID = "android.telephony.extra.MNO_CARRIER_ID";

    /**
     * An string extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which
     * indicates the updated carrier name of the current subscription.
     * {@see TelephonyManager#getSimCarrierIdName()}
     * <p>Carrier name is a user-facing name of the carrier id {@link #EXTRA_CARRIER_ID},
     * usually the brand name of the subsidiary (e.g. T-Mobile).
     */
    public static final String EXTRA_CARRIER_NAME = "android.telephony.extra.CARRIER_NAME";

    /**
     * An int extra used with {@link #ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED} which
     * indicates the updated precise carrier id {@link TelephonyManager#getSimPreciseCarrierId()} of
     * the current subscription. Note, its possible precise carrier id changes while
     * {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} remains the same e.g, when
     * subscription switch to different IMSI.
     * indicates the updated precise carrier id returned by
     * {@link TelephonyManager#getSimPreciseCarrierId()}. Note, its possible precise carrier id
     * changes while {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} remains the same
     * e.g, when subscription switch to different IMSIs.
     * <p>Will be {@link TelephonyManager#UNKNOWN_CARRIER_ID} if the subscription is unavailable or
     * the carrier cannot be identified.
     * @hide
     */
    public static final String EXTRA_PRECISE_CARRIER_ID =
            "android.telephony.extra.PRECISE_CARRIER_ID";

    /**
     * An string extra used with {@link #ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED} which
     * indicates the updated precise carrier name of the current subscription.
     * {@see TelephonyManager#getSimPreciseCarrierIdName()}
     * <p>it's a user-facing name of the precise carrier id {@link #EXTRA_PRECISE_CARRIER_ID},
     * @hide
     * indicates the updated precise carrier name returned by
     * {@link TelephonyManager#getSimPreciseCarrierIdName()}.
     * <p>it's a user-facing name of the precise carrier id {@link #EXTRA_PRECISE_CARRIER_ID}, e.g,
     * Tracfone-AT&T.
     */
    public static final String EXTRA_PRECISE_CARRIER_NAME = "android.telephony.extra.CARRIER_NAME";
    public static final String EXTRA_PRECISE_CARRIER_NAME =
            "android.telephony.extra.PRECISE_CARRIER_NAME";

    /**
     * An int extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} to indicate the
@@ -8533,7 +8531,7 @@ public class TelephonyManager {

    /**
     * Returns carrier id name of the current subscription.
     * <p>Carrier id name is a user-facing name of carrier id
     * <p>Carrier id name is a user-facing name of carrier id returned by
     * {@link #getSimCarrierId()}, usually the brand name of the subsidiary
     * (e.g. T-Mobile). Each carrier could configure multiple {@link #getSimOperatorName() SPN} but
     * should have a single carrier name. Carrier name is not a canonical identity,
@@ -8543,7 +8541,7 @@ public class TelephonyManager {
     * @return Carrier name of the current subscription. Return {@code null} if the subscription is
     * unavailable or the carrier cannot be identified.
     */
    public CharSequence getSimCarrierIdName() {
    public @Nullable CharSequence getSimCarrierIdName() {
        try {
            ITelephony service = getITelephony();
            if (service != null) {
@@ -8560,10 +8558,10 @@ public class TelephonyManager {
     *
     * <p>The precise carrier id can be used to further differentiate a carrier by different
     * networks, by prepaid v.s.postpaid or even by 4G v.s.3G plan. Each carrier has a unique
     * carrier id {@link #getSimCarrierId()} but can have multiple precise carrier id. e.g,
     * {@link #getSimCarrierId()} will always return Tracfone (id 2022) for a Tracfone SIM, while
     * {@link #getSimPreciseCarrierId()} can return Tracfone AT&T or Tracfone T-Mobile based on the
     * current subscription IMSI.
     * carrier id returned by {@link #getSimCarrierId()} but could have multiple precise carrier id.
     * e.g, {@link #getSimCarrierId()} will always return Tracfone (id 2022) for a Tracfone SIM,
     * while {@link #getSimPreciseCarrierId()} can return Tracfone AT&T or Tracfone T-Mobile based
     * on the current subscription IMSI.
     *
     * <p>For carriers without any fine-grained carrier ids, return {@link #getSimCarrierId()}
     * <p>Precise carrier ids are defined in the same way as carrier id
@@ -8573,8 +8571,6 @@ public class TelephonyManager {
     * @return Returns fine-grained carrier id of the current subscription.
     * Return {@link #UNKNOWN_CARRIER_ID} if the subscription is unavailable or the carrier cannot
     * be identified.
     *
     * @hide
     */
    public int getSimPreciseCarrierId() {
        try {
@@ -8590,16 +8586,14 @@ public class TelephonyManager {

    /**
     * Similar like {@link #getSimCarrierIdName()}, returns user-facing name of the
     * precise carrier id {@link #getSimPreciseCarrierId()}
     * precise carrier id returned by {@link #getSimPreciseCarrierId()}.
     *
     * <p>The returned name is unlocalized.
     *
     * @return user-facing name of the subscription precise carrier id. Return {@code null} if the
     * subscription is unavailable or the carrier cannot be identified.
     *
     * @hide
     */
    public CharSequence getSimPreciseCarrierIdName() {
    public @Nullable CharSequence getSimPreciseCarrierIdName() {
        try {
            ITelephony service = getITelephony();
            if (service != null) {
@@ -8612,43 +8606,54 @@ public class TelephonyManager {
    }

    /**
     * Return a list of certs in hex string from loaded carrier privileges access rules.
     * Returns carrier id based on sim MCCMNC (returned by {@link #getSimOperator()}) only.
     * This is used for fallback when configurations/logic for exact carrier id
     * {@link #getSimCarrierId()} are not found.
     *
     * @return a list of certificate in hex string. return {@code null} if there is no certs
     * or privilege rules are not loaded yet.
     * Android carrier id table <a href="https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/carrier_list.textpb">here</a>
     * can be updated out-of-band, its possible a MVNO (Mobile Virtual Network Operator) carrier
     * was not fully recognized and assigned to its MNO (Mobile Network Operator) carrier id
     * by default. After carrier id table update, a new carrier id was assigned. If apps don't
     * take the update with the new id, it might be helpful to always fallback by using carrier
     * id based on MCCMNC if there is no match.
     *
     * <p>Requires Permission:
     * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE}
     * @hide
     * @return matching carrier id from sim MCCMNC. Return {@link #UNKNOWN_CARRIER_ID} if the
     * subscription is unavailable or the carrier cannot be identified.
     */
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public List<String> getCertsFromCarrierPrivilegeAccessRules() {
    public int getCarrierIdFromSimMccMnc() {
        try {
            ITelephony service = getITelephony();
            if (service != null) {
                return service.getCertsFromCarrierPrivilegeAccessRules(getSubId());
                return service.getCarrierIdFromMccMnc(getSlotIndex(), getSimOperator(), true);
            }
        } catch (RemoteException ex) {
            // This could happen if binder process crashes.
        }
        return null;
        return UNKNOWN_CARRIER_ID;
    }

     /**
     * Returns MNO carrier id of the current subscription’s MCCMNC.
     * <p>MNO carrier id can be solely identified by subscription mccmnc. This is mainly used
     * for MNO fallback when exact carrier id {@link #getSimCarrierId()}
     * configurations are not found.
      * Returns carrier id based on MCCMNC (returned by {@link #getSimOperator()}) only. This is
      * used for fallback when configurations/logic for exact carrier id {@link #getSimCarrierId()}
      * are not found.
      *
     * @return MNO carrier id of the current subscription. Return the value same as carrier id
     * {@link #getSimCarrierId()}, if MNO carrier id cannot be identified.
      * Android carrier id table <a href="https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/carrier_list.textpb">here</a>
      * can be updated out-of-band, its possible a MVNO (Mobile Virtual Network Operator) carrier
      * was not fully recognized and assigned to its MNO (Mobile Network Operator) carrier id
      * by default. After carrier id table update, a new carrier id was assigned. If apps don't
      * take the update with the new id, it might be helpful to always fallback by using carrier
      * id based on MCCMNC if there is no match.
      *
      * @return matching carrier id from passing MCCMNC. Return {@link #UNKNOWN_CARRIER_ID} if the
      * subscription is unavailable or the carrier cannot be identified.
      * @hide
      */
    public int getSimMNOCarrierId() {
     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
     public int getCarrierIdFromMccMnc(String mccmnc) {
        try {
            ITelephony service = getITelephony();
            if (service != null) {
                return service.getSubscriptionMNOCarrierId(getSubId());
                return service.getCarrierIdFromMccMnc(getSlotIndex(), mccmnc, false);
            }
        } catch (RemoteException ex) {
            // This could happen if binder process crashes.
@@ -8657,23 +8662,26 @@ public class TelephonyManager {
    }

    /**
      * Returns carrier id based on MCCMNC only. This is for fallback when exact carrier id
      * {@link #getSimCarrierId()} configurations are not found
     * Return a list of certs in hex string from loaded carrier privileges access rules.
     *
     * @return a list of certificate in hex string. return {@code null} if there is no certs
     * or privilege rules are not loaded yet.
     *
      * @return matching carrier id from passing mccmnc.
     * <p>Requires Permission:
     * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE}
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
     public int getCarrierIdFromMccMnc(String mccmnc) {
    public List<String> getCertsFromCarrierPrivilegeAccessRules() {
        try {
            ITelephony service = getITelephony();
            if (service != null) {
                return service.getCarrierIdFromMccMnc(getSlotIndex(), mccmnc);
                return service.getCertsFromCarrierPrivilegeAccessRules(getSubId());
            }
        } catch (RemoteException ex) {
            // This could happen if binder process crashes.
        }
        return UNKNOWN_CARRIER_ID;
        return null;
    }

    /**
Loading