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

Commit a7ba0fb2 authored by Pooja Jain's avatar Pooja Jain
Browse files

IMS: Add support for call deflection feature

Call deflection feature is useful to deflect MT call to another
number.

Test: Manual

Bug: 62170348
Change-Id: Ie91e6fb7eb7589364c8fb0a0bae2d3ffb0db678e
parent a402e89c
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -1165,6 +1165,30 @@ public class ImsCall implements ICall {
        }
    }

    /**
     * Deflects a call.
     *
     * @param number number to be deflected to.
     * @throws ImsException if the IMS service fails to deflect the call
     */
    public void deflect(String number) throws ImsException {
        logi("deflect :: session=" + mSession + ", number=" + Rlog.pii(TAG, number));

        synchronized(mLockObj) {
            if (mSession == null) {
                throw new ImsException("No call to deflect",
                        ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED);
            }

            try {
                mSession.deflect(number);
            } catch (Throwable t) {
                loge("deflect :: ", t);
                throw new ImsException("deflect()", t, 0);
            }
        }
    }

    /**
     * Rejects a call.
     *