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

Commit eb0a8d56 authored by Evan Charlton's avatar Evan Charlton
Browse files

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
parent f40275d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -28474,6 +28474,7 @@ package android.telecomm {
    method public void addNewIncomingCall(android.telecomm.PhoneAccountHandle, android.os.Bundle);
    method public void addNewIncomingCall(android.telecomm.PhoneAccountHandle, android.os.Bundle);
    method public void cancelMissedCallsNotification();
    method public void cancelMissedCallsNotification();
    method public void clearAccounts(java.lang.String);
    method public void clearAccounts(java.lang.String);
    method public android.telecomm.PhoneAccountHandle getConnectionManager();
    method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount(java.lang.String);
    method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount(java.lang.String);
    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);
+11 −0
Original line number Original line Diff line number Diff line
@@ -367,6 +367,17 @@ public class TelecommManager {
        return new ArrayList<>();
        return new ArrayList<>();
    }
    }


    /**
     * 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
     * Returns a list of {@link PhoneAccountHandle}s which can be used to make and receive phone
     * calls which support the specified URI scheme.
     * calls which support the specified URI scheme.