summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorSailesh Nepal <sail@google.com>2015-07-28 19:22:14 -0700
committerSailesh Nepal <sail@google.com>2015-07-28 22:16:25 -0700
commitcf85562bc9a0f01db51b4088e72f05a8089fc7f1 (patch)
tree0f5bb407dbf8c0db7b489b47e5d367bca060384d /telecomm
parentb8040265dd0d5a2a96e0850623647dad2f528db1 (diff)
downloadframeworks_base-cf85562bc9a0f01db51b4088e72f05a8089fc7f1.zip
frameworks_base-cf85562bc9a0f01db51b4088e72f05a8089fc7f1.tar.gz
frameworks_base-cf85562bc9a0f01db51b4088e72f05a8089fc7f1.tar.bz2
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
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java20
-rw-r--r--telecomm/java/com/android/internal/telecom/ITelecomService.aidl5
2 files changed, 25 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index a30e1c0..3b59f27 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -493,6 +493,26 @@ public class TelecomManager {
}
/**
+ * 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}.
diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
index fb0f6da..2e07759 100644
--- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
+++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
@@ -93,6 +93,11 @@ interface ITelecomService {
PhoneAccountHandle getSimCallManager();
/**
+ * @see TelecomServiceImpl#getSimCallManagerForUser
+ */
+ PhoneAccountHandle getSimCallManagerForUser(int userId);
+
+ /**
* @see TelecomServiceImpl#registerPhoneAccount
*/
void registerPhoneAccount(in PhoneAccount metadata);