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

Commit 7796e4d3 authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Add voip audio mode configuration for ims call"

am: a8829d52

Change-Id: I7dd89155744d7f43b06dcd6500d854179bd0e91b
parents 502e8795 a8829d52
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -188,6 +188,7 @@ public abstract class Connection {
    private int mVideoState;
    private int mConnectionCapabilities;
    private boolean mIsWifi;
    private boolean mAudioModeIsVoip;
    private int mAudioQuality;
    private int mCallSubstate;
    private android.telecom.Connection.VideoProvider mVideoProvider;
@@ -699,6 +700,15 @@ public abstract class Connection {
        return mIsWifi;
    }

    /**
     * Returns whether the connection uses voip audio mode
     *
     * @return {@code True} if the connection uses voip audio mode
     */
    public boolean getAudioModeIsVoip() {
        return mAudioModeIsVoip;
    }

    /**
     * Returns the {@link android.telecom.Connection.VideoProvider} for the connection.
     *
@@ -769,6 +779,15 @@ public abstract class Connection {
        }
    }

    /**
     * Set the voip audio mode for the connection
     *
     * @param isVoip {@code True} if voip audio mode is being used.
     */
    public void setAudioModeIsVoip(boolean isVoip) {
        mAudioModeIsVoip = isVoip;
    }

    /**
     * Set the audio quality for the connection.
     *
+10 −0
Original line number Diff line number Diff line
@@ -191,6 +191,11 @@ public class ImsPhoneConnection extends Connection implements
                (mIsIncoming? ImsPhoneCall.State.INCOMING: ImsPhoneCall.State.DIALING));

        fetchDtmfToneDelay(phone);

        if (phone.getContext().getResources().getBoolean(
                com.android.internal.R.bool.config_use_voip_mode_for_ims)) {
            setAudioModeIsVoip(true);
        }
    }

    /** This is an MO call, created when dialing */
@@ -222,6 +227,11 @@ public class ImsPhoneConnection extends Connection implements
        mIsEmergency = isEmergency;

        fetchDtmfToneDelay(phone);

        if (phone.getContext().getResources().getBoolean(
                com.android.internal.R.bool.config_use_voip_mode_for_ims)) {
            setAudioModeIsVoip(true);
        }
    }

    public void dispose() {