diff options
| author | 2014-07-23 23:45:16 +0000 | |
|---|---|---|
| committer | 2014-07-23 18:38:23 +0000 | |
| commit | 2e02b9ea5c04137c83817d044adba74641cfeeb8 (patch) | |
| tree | f999d9d2f605c5328962aa77058f5974f5619943 | |
| parent | 85b1df187fc291d2425dc8e0252323c63dc15368 (diff) | |
| parent | 6080118bebab2da4bf85778e90ab4bd24c662e95 (diff) | |
Merge "Hide multiple-account information if there is only a single account" into lmp-dev
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | telecomm/java/android/telecomm/TelecommManager.java | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt index b9f018a0c234..84f9912e4071 100644 --- a/api/current.txt +++ b/api/current.txt @@ -28871,6 +28871,7 @@ package android.telecomm { method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount(); method public java.util.List<android.telecomm.PhoneAccountHandle> getEnabledPhoneAccounts(); method public android.telecomm.PhoneAccount getPhoneAccount(android.telecomm.PhoneAccountHandle); + method public boolean hasMultipleEnabledAccounts(); method public void registerPhoneAccount(android.telecomm.PhoneAccount); method public void unregisterPhoneAccount(android.telecomm.PhoneAccountHandle); field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.intent.action.CONNECTION_SERVICE_CONFIGURE"; diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecomm/TelecommManager.java index ea89a534c3e7..49f95a6c8350 100644 --- a/telecomm/java/android/telecomm/TelecommManager.java +++ b/telecomm/java/android/telecomm/TelecommManager.java @@ -291,6 +291,16 @@ public class TelecommManager { } /** + * Determine whether the device has more than one account registered and enabled. + * + * @return {@code true} if the device has more than one account registered and enabled and + * {@code false} otherwise. + */ + public boolean hasMultipleEnabledAccounts() { + return getEnabledPhoneAccounts().size() > 1; + } + + /** * Return the {@link PhoneAccount} for a specified {@link PhoneAccountHandle}. Object includes * resources which can be used in a user interface. * |