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

Commit 1997a5ea authored by Fabien Hubert's avatar Fabien Hubert Committed by Shuo Gao
Browse files

Telephony: Handling of supplimentary services in Call



When there are active calls, the candial() returns false
and if the user supplied an MMI code for supplementary
service it will not be accepted.

The codes for supplementary services such as hold, reflect
transfer etc are now handled with this patch, even when
dial cannot be done.

Change-Id: Ic90d71112ca9fd3250b82660a2929590491e41ba
Author: Fabien Hubert <fabien.hubert@intel.com>
Signed-off-by: default avatarFabien Hubert <fabien.hubert@intel.com>
Signed-off-by: default avatarArun Ravindran <arun.ravindran@intel.com>
Signed-off-by: default avatarJeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: default avatarShuo Gao <shuo.gao@intel.com>
Signed-off-by: default avatarBruce Beare <bruce.j.beare@intel.com>
Signed-off-by: default avatarJack Ren <jack.ren@intel.com>
Author-tracking-BZ: 577
parent cd17a8e5
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.os.Handler;
import android.os.Message;
import android.os.RegistrantList;
import android.os.Registrant;
import android.telephony.PhoneNumberUtils;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.Rlog;
@@ -749,8 +750,18 @@ public final class CallManager {
        }

        if (!canDial(phone)) {
            /*
             * canDial function only checks whether the phone can make a new call.
             * InCall MMI commmands are basically supplementary services
             * within a call eg: call hold, call deflection, explicit call transfer etc.
             */
            String newDialString = PhoneNumberUtils.stripSeparators(dialString);
            if (basePhone.handleInCallMmiCommands(newDialString)) {
                return null;
            } else {
                throw new CallStateException("cannot dial in current state");
            }
        }

        if ( hasActiveFgCall() ) {
            Phone activePhone = getActiveFgCall().getPhone();