aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPooja Jain <poojain@codeaurora.org>2017-12-28 14:35:18 +0530
committerPooja Jain <poojain@codeaurora.org>2018-02-07 11:34:11 +0530
commita7ba0fb28496aff091a2e172607f0e4e848c3c1c (patch)
tree87cfd069d65d351f1fb91c3a9db5fddd0efdf93d
parenta402e89c7dcbc612b2aa8176ec0b997f7946c3e0 (diff)
downloadims-a7ba0fb28496aff091a2e172607f0e4e848c3c1c.tar.gz
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
-rw-r--r--src/java/com/android/ims/ImsCall.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/java/com/android/ims/ImsCall.java b/src/java/com/android/ims/ImsCall.java
index 760e5e81..5fceb7af 100644
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -1166,6 +1166,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.
*
* @param reason reason code to reject an incoming call