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

Commit b5245ec5 authored by Omkar Kolangade's avatar Omkar Kolangade Committed by Tyler Gunn
Browse files

IMS: Allow DTMF Pause-Dialing

Adding a check to correctly identify and
differentiate MMI codes from pause-dial
DTMF dial strings. This check is based on
3GPP TS 22.030 6.5.2.
Lack of this check was causing dial strings
to be incorrectly identified as USSD codes,
to be sent over IMS UT.

Change-Id: I7e5cae31580ebff76b84b59ca9795cae06171821
parent 072f14af
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1085,8 +1085,10 @@ public class GsmCdmaPhone extends Phone {
                && ImsManager.isNonTtyOrTtyOnVolteEnabled(mContext)
                && (imsPhone.getServiceState().getState() != ServiceState.STATE_POWER_OFF);

        boolean isUt = PhoneNumberUtils.extractNetworkPortionAlt(PhoneNumberUtils.
                stripSeparators(dialString)).endsWith("#");
        String dialPart = PhoneNumberUtils.extractNetworkPortionAlt(PhoneNumberUtils.
                stripSeparators(dialString));
        boolean isUt = (dialPart.startsWith("*") || dialPart.startsWith("#"))
                && dialPart.endsWith("#");

        boolean useImsForUt = imsPhone != null && imsPhone.isUtEnabled();