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

Commit f3b55754 authored by Garik Badalyan's avatar Garik Badalyan Committed by Gerrit - the friendly Code Review server
Browse files

IMS: Supplementary services

-Propagate IMS supplementary services to telphony framework
-Introduce call forwarding history info.

Change-Id: I43b281fe194e4a096dd057bb365cbf097d7be85a
CRs-Fixed: 772163 786079
parent 361b7d26
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ public class SuppServiceNotification {
    /** TS 27.007 7.17 "number" (MT only) */
    public String number;

    /** List of forwarded numbers, if any */
    public String[] history;

    static public final int MO_CODE_UNCONDITIONAL_CF_ACTIVE     = 0;
    static public final int MO_CODE_SOME_CF_ACTIVE              = 1;
    static public final int MO_CODE_CALL_FORWARDED              = 2;
@@ -64,6 +67,7 @@ public class SuppServiceNotification {
            + (notificationType == 0 ? " originated " : " terminated ")
            + " code: " + code
            + " index: " + index
            + " history: " + history
            + " \""
            + PhoneNumberUtils.stringFromStringAndTOA(number, type) + "\" ";
    }
+13 −11
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import com.android.ims.ImsException;
import com.android.ims.ImsManager;
import com.android.ims.ImsReasonInfo;
import com.android.ims.ImsServiceClass;
import com.android.ims.ImsSuppServiceNotification;
import com.android.ims.ImsUtInterface;
import com.android.ims.internal.CallGroup;
import com.android.ims.internal.IImsVideoCallProvider;
@@ -1265,13 +1266,6 @@ public final class ImsPhoneCallTracker extends CallTracker {
                mPhone.stopOnHoldTone();
                mOnHoldToneStarted = false;
            }

            SuppServiceNotification supp = new SuppServiceNotification();
            // Type of notification: 0 = MO; 1 = MT
            // Refer SuppServiceNotification class documentation.
            supp.notificationType = 1;
            supp.code = SuppServiceNotification.MT_CODE_CALL_RETRIEVED;
            mPhone.notifySuppSvcNotification(supp);
        }

        @Override
@@ -1285,12 +1279,20 @@ public final class ImsPhoneCallTracker extends CallTracker {
                    mOnHoldToneStarted = true;
                }
            }
        }

        @Override
        public void onCallSuppServiceReceived(ImsCall call,
                ImsSuppServiceNotification suppServiceInfo) {
            if (DBG) log("onCallSuppServiceReceived: suppServiceInfo=" + suppServiceInfo);

            SuppServiceNotification supp = new SuppServiceNotification();
            // Type of notification: 0 = MO; 1 = MT
            // Refer SuppServiceNotification class documentation.
            supp.notificationType = 1;
            supp.code = SuppServiceNotification.MT_CODE_CALL_ON_HOLD;
            supp.notificationType = suppServiceInfo.notificationType ;
            supp.code = suppServiceInfo.code;
            supp.index = suppServiceInfo.index;
            supp.number = suppServiceInfo.number;
            supp.history = suppServiceInfo.history;

            mPhone.notifySuppSvcNotification(supp);
        }