diff options
| author | 2018-10-30 18:18:43 -0700 | |
|---|---|---|
| committer | 2018-11-01 13:02:15 -0700 | |
| commit | c9b22f31a19c63828dce034eb92e1ad29e64df9a (patch) | |
| tree | 7f9428785de1be43c16230d8e8d327b786369260 | |
| parent | 973501cd343ef8df3b3ceea15609e9e0033c06ae (diff) | |
hidden API getCertsFromCarrierPrivilegeAccessRules
Bug: 110559381
Test: unit test & manual test
Change-Id: I7b2c946f1f4db08e1c071fe6eb9f3771a592fd47
| -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 32ca156054f7..591822cc74b1 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -8274,6 +8274,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 d20627762619..97a789fbb83a 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -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); } |