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

Commit 8b35a492 authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Add a method to query the voicemail number.

Change-Id: I74a4b458808b7da067b4edc9a1341a09d0403871
parent 07432aad
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30342,6 +30342,7 @@ package android.telecom {
    method public android.telecom.PhoneAccountHandle getDefaultOutgoingPhoneAccount(java.lang.String);
    method public android.content.ComponentName getDefaultPhoneApp();
    method public java.lang.String getLine1Number(android.telecom.PhoneAccountHandle);
    method public java.lang.String getVoiceMailNumber(android.telecom.PhoneAccountHandle);
    method public android.telecom.PhoneAccount getPhoneAccount(android.telecom.PhoneAccountHandle);
    method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage();
    method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String);
+20 −0
Original line number Diff line number Diff line
@@ -761,6 +761,26 @@ public class TelecomManager {
        return false;
    }

    /**
     * Return the voicemail number for a given phone account.
     *
     * @param accountHandle The handle for the account to retrieve the voicemail number for.
     * @return A string representation if the voicemail number.
     *
     * @hide
     */
    @SystemApi
    public String getVoiceMailNumber(PhoneAccountHandle accountHandle) {
        try {
            if (isServiceConnected()) {
                return getTelecomService().getVoiceMailNumber(accountHandle);
            }
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException calling ITelecomService#getVoiceMailNumber.", e);
        }
        return null;
    }

    /**
     * Return the line 1 phone number for given phone account.
     *
+5 −0
Original line number Diff line number Diff line
@@ -130,6 +130,11 @@ interface ITelecomService {
     */
    boolean hasVoiceMailNumber(in PhoneAccountHandle accountHandle);

    /**
     * @see TelecomServiceImpl#getVoiceMailNumber
     */
    String getVoiceMailNumber(in PhoneAccountHandle accountHandle);

    /**
     * @see TelecomServiceImpl#getDefaultPhoneApp
     */