Hide multiple-account information if there is only a single account
Adding an API method to telecomm to determine whether there is a single account. Bug: 16483795 Change-Id: If30d3a53458b4c784995f3f9e471c8163a8175a4
This commit is contained in:
@@ -290,6 +290,16 @@ public class TelecommManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user