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

Commit 252040f5 authored by Chen Xu's avatar Chen Xu Committed by Android (Google) Code Review
Browse files

Merge "hidden API getCertsFromCarrierPrivilegeAccessRules"

parents 9b2ca344 c9b22f31
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -8273,6 +8273,29 @@ public class TelephonyManager {
        return null;
    }

    /**
     * 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.
     *
     * <p>Requires Permission:
     * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE}
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    public List<String> getCertsFromCarrierPrivilegeAccessRules() {
        try {
            ITelephony service = getITelephony();
            if (service != null) {
                return service.getCertsFromCarrierPrivilegeAccessRules(getSubId());
            }
        } catch (RemoteException ex) {
            // This could happen if binder process crashes.
        }
        return null;
    }

    /**
     * Return the application ID for the uicc application type like {@link #APPTYPE_CSIM}.
     * All uicc applications are uniquely identified by application ID. See ETSI 102.221 and 101.220
+5 −0
Original line number Diff line number Diff line
@@ -1641,4 +1641,9 @@ interface ITelephony {
     * Identify if the number is emergency number, based on all the active subscriptions.
     */
    boolean isCurrentEmergencyNumber(String number);
    
    /**
     * Return a list of certs in hex string from loaded carrier privileges access rules.
     */
    List<String> getCertsFromCarrierPrivilegeAccessRules(int subId);
}