summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-09-04 12:03:34 -0700
committerEvan Charlton <evanc@google.com>2014-09-04 14:41:03 -0700
commiteb0a8d562122d67a528286c595395f90ac2720cd (patch)
tree19ae0a9865170173ab75318909c1f8cd11e3acdb /telecomm
parentf40275d35ec3eaadbd1afd296715215bdd29a09b (diff)
downloadframeworks_base-eb0a8d562122d67a528286c595395f90ac2720cd.zip
frameworks_base-eb0a8d562122d67a528286c595395f90ac2720cd.tar.gz
frameworks_base-eb0a8d562122d67a528286c595395f90ac2720cd.tar.bz2
Add a way to fetch the current connection manager
Apps should have this API so they know if they're the default or not, so that they can determine whether to send the user to the settings page in order to enable the app. Bug: 17383883 Change-Id: I4e75ad94398d7cdc01dbf97bd684c839d897d8e5
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecomm/TelecommManager.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecomm/TelecommManager.java
index 071b719..fb9852d 100644
--- a/telecomm/java/android/telecomm/TelecommManager.java
+++ b/telecomm/java/android/telecomm/TelecommManager.java
@@ -368,6 +368,17 @@ public class TelecommManager {
}
/**
+ * 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}.
+ *
+ * @return The phone account handle of the current connection manager.
+ */
+ public PhoneAccountHandle getConnectionManager() {
+ return getSimCallManager();
+ }
+
+ /**
* Returns a list of {@link PhoneAccountHandle}s which can be used to make and receive phone
* calls which support the specified URI scheme.
* <P>