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

Commit 0ccc5562 authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Rtt bugfixes, part 5

am: dc719d4f

Change-Id: I147b876fe7544fc57ea62f1ba8d2096ad8fe42e9
parents 0dfbcc73 dc719d4f
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -604,6 +604,12 @@ public class ImsCall implements ICall {
     */
    private int mOverrideReason = ImsReasonInfo.CODE_UNSPECIFIED;

    /**
     * When true, if this call is incoming, it will be answered with an
     * {@link ImsStreamMediaProfile} that has RTT enabled.
     */
    private boolean mAnswerWithRtt = false;

    /**
     * Create an IMS call object.
     *
@@ -1135,6 +1141,11 @@ public class ImsCall implements ICall {
    public void accept(int callType, ImsStreamMediaProfile profile) throws ImsException {
        logi("accept :: callType=" + callType + ", profile=" + profile);

        if (mAnswerWithRtt) {
            profile.mRttMode = ImsStreamMediaProfile.RTT_MODE_FULL;
            logi("accept :: changing media profile RTT mode to full");
        }

        synchronized(mLockObj) {
            if (mSession == null) {
                throw new ImsException("No call to answer",
@@ -1681,6 +1692,10 @@ public class ImsCall implements ICall {
        }
    }

    public void setAnswerWithRtt() {
        mAnswerWithRtt = true;
    }

    private void clear(ImsReasonInfo lastReasonInfo) {
        mInCall = false;
        mHold = false;