new hidden API to getCertsFromCarrierPrivilegeRules
Bug: 110559381
Test: unit test & manual
Change-Id: I13c73a91761d0835173b7687fc2e8d7f8588030d
Merged-in: I13c73a91761d0835173b7687fc2e8d7f8588030d
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 09c4d97..f5e675c 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -5660,4 +5660,24 @@
Binder.restoreCallingIdentity(identity);
}
}
+
+ @Override
+ public List<String> getCertsFromCarrierPrivilegeAccessRules(int subId) {
+ enforceReadPrivilegedPermission("getCertsFromCarrierPrivilegeAccessRules");
+ Phone phone = getPhone(subId);
+ if (phone == null) {
+ return null;
+ }
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ UiccProfile profile = UiccController.getInstance()
+ .getUiccProfileForPhone(phone.getPhoneId());
+ if (profile != null) {
+ return profile.getCertsFromCarrierPrivilegeAccessRules();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ return null;
+ }
}