Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6080118b authored by Nancy Chen's avatar Nancy Chen
Browse files

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
parent b8cb6518
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -28869,6 +28869,7 @@ package android.telecomm {
    method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount();
    method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount();
    method public java.util.List<android.telecomm.PhoneAccountHandle> getEnabledPhoneAccounts();
    method public java.util.List<android.telecomm.PhoneAccountHandle> getEnabledPhoneAccounts();
    method public android.telecomm.PhoneAccount getPhoneAccount(android.telecomm.PhoneAccountHandle);
    method public android.telecomm.PhoneAccount getPhoneAccount(android.telecomm.PhoneAccountHandle);
    method public boolean hasMultipleEnabledAccounts();
    method public void registerPhoneAccount(android.telecomm.PhoneAccount);
    method public void registerPhoneAccount(android.telecomm.PhoneAccount);
    method public void unregisterPhoneAccount(android.telecomm.PhoneAccountHandle);
    method public void unregisterPhoneAccount(android.telecomm.PhoneAccountHandle);
    field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.intent.action.CONNECTION_SERVICE_CONFIGURE";
    field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.intent.action.CONNECTION_SERVICE_CONFIGURE";
+10 −0
Original line number Original line Diff line number Diff line
@@ -290,6 +290,16 @@ public class TelecommManager {
        return null;
        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
     * Return the {@link PhoneAccount} for a specified {@link PhoneAccountHandle}. Object includes
     * resources which can be used in a user interface.
     * resources which can be used in a user interface.