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

Commit a8829d52 authored by Tyler Gunn's avatar Tyler Gunn Committed by Gerrit Code Review
Browse files

Merge "Add voip audio mode configuration for ims call"

parents 73e1b75d c6e763fa
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -178,6 +178,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;
@@ -667,6 +668,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.
     *
@@ -737,6 +747,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
@@ -179,6 +179,11 @@ public class ImsPhoneConnection extends Connection {
                (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 */
@@ -210,6 +215,11 @@ public class ImsPhoneConnection extends Connection {
        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() {