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

Commit 0d5b34f9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fixed that call forwarding icon not shown issue"

parents 90a154ff 5f37e9b8
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;
@@ -875,9 +876,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);