diff options
| author | 2018-11-02 17:29:30 +0000 | |
|---|---|---|
| committer | 2018-11-02 17:29:30 +0000 | |
| commit | b23fc3c2cd4f03a312fd0fd1fe5472a6b27f920f (patch) | |
| tree | eb9ae07e230ba7b029f914a785a33966d94a19b7 | |
| parent | 31d6ca5c3a1b80917e2b57a57f7188b96a426460 (diff) | |
| parent | 7a545324ffe8c2c2503078966c06f78906300800 (diff) | |
Merge "hidden API getCertsFromCarrierPrivilegeAccessRules"
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 23 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 5 |
2 files changed, 28 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 91f832b97ff3..e4f766f28d01 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -8244,6 +8244,29 @@ public class TelephonyManager { } /** + * 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 * <p>Requires Permission: diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 2e79c6162844..4b9b0fb84f16 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -1617,4 +1617,9 @@ interface ITelephony { * return true if TTY over VoLTE is enabled for the subscription specified. */ boolean isTtyOverVolteEnabled(int subId); + + /** + * Return a list of certs in hex string from loaded carrier privileges access rules. + */ + List<String> getCertsFromCarrierPrivilegeAccessRules(int subId); } |