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

Commit aea49bb0 authored by Jack Yu's avatar Jack Yu
Browse files

Fixed that call forwarding icon not shown issue

Fixed that call forwarding icon not shown when enabling
all call forwarding (i.e. unconditional + all conditional) when
using UT interface. Used the same logic from circuit switch SS.

Test: manual
bug: 69427654
Change-Id: I5e43f006bfb4752ca1119e3e226746923a10f4a3
parent 54080689
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -863,6 +863,13 @@ public final class GsmMmiCode extends Handler implements MmiCode {
        return mIsSsInfo;
    }

    public static boolean isVoiceUnconditionalForwarding(int reason, int serviceClass) {
        return (((reason == CommandsInterface.CF_REASON_UNCONDITIONAL)
                || (reason == CommandsInterface.CF_REASON_ALL))
                && (((serviceClass & CommandsInterface.SERVICE_CLASS_VOICE) != 0)
                || (serviceClass == CommandsInterface.SERVICE_CLASS_NONE)));
    }

    /** Process a MMI code or short code...anything that isn't a dialing number */
    public void
    processCode() throws CallStateException {
@@ -933,12 +940,6 @@ public final class GsmMmiCode extends Handler implements MmiCode {
                        throw new RuntimeException ("invalid action");
                    }

                    int isSettingUnconditionalVoice =
                        (((reason == CommandsInterface.CF_REASON_UNCONDITIONAL) ||
                                (reason == CommandsInterface.CF_REASON_ALL)) &&
                                (((serviceClass & CommandsInterface.SERVICE_CLASS_VOICE) != 0) ||
                                 (serviceClass == CommandsInterface.SERVICE_CLASS_NONE))) ? 1 : 0;

                    int isEnableDesired =
                        ((cfAction == CommandsInterface.CF_ACTION_ENABLE) ||
                                (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0;
@@ -947,7 +948,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
                    mPhone.mCi.setCallForward(cfAction, reason, serviceClass,
                            dialingNumber, time, obtainMessage(
                                    EVENT_SET_CFF_COMPLETE,
                                    isSettingUnconditionalVoice,
                                    isVoiceUnconditionalForwarding(reason, serviceClass) ? 1 : 0,
                                    isEnableDesired, this));
                }
            } else if (isServiceCodeCallBarring(mSc)) {
+3 −3
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ import com.android.internal.telephony.TelephonyComponentFactory;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.UUSInfo;
import com.android.internal.telephony.gsm.GsmMmiCode;
import com.android.internal.telephony.gsm.SuppServiceNotification;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.util.NotificationChannelController;
@@ -876,9 +877,8 @@ public class ImsPhone extends ImsPhoneBase {
        if ((isValidCommandInterfaceCFAction(commandInterfaceCFAction)) &&
                (isValidCommandInterfaceCFReason(commandInterfaceCFReason))) {
            Message resp;
            Cf cf = new Cf(dialingNumber,
                    (commandInterfaceCFReason == CF_REASON_UNCONDITIONAL ? true : false),
                    onComplete);
            Cf cf = new Cf(dialingNumber, GsmMmiCode.isVoiceUnconditionalForwarding(
                    commandInterfaceCFReason, serviceClass), onComplete);
            resp = obtainMessage(EVENT_SET_CALL_FORWARD_DONE,
                    isCfEnable(commandInterfaceCFAction) ? 1 : 0, 0, cf);