Default permissions for sim call manager
This CL adds the following permissions by default to the
SIM call manager:
- microphone
- phone
BUG: 22790160
Change-Id: Icaf1db6c6943b3ddbd16a946a81d1bfb734d761f
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index a30e1c0..3b59f27d 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -493,6 +493,26 @@
}
/**
+ * Returns the current SIM call manager for the specified user. Apps must be prepared for this
+ * method to return {@code null}, indicating that there currently exists no user-chosen default
+ * {@code PhoneAccount}.
+ *
+ * @return The phone account handle of the current sim call manager.
+ *
+ * @hide
+ */
+ public PhoneAccountHandle getSimCallManager(int userId) {
+ try {
+ if (isServiceConnected()) {
+ return getTelecomService().getSimCallManagerForUser(userId);
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelecomService#getSimCallManagerForUser");
+ }
+ return null;
+ }
+
+ /**
* Returns the current connection manager. Apps must be prepared for this method to return
* {@code null}, indicating that there currently exists no user-chosen default
* {@code PhoneAccount}.