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

Commit 932009d4 authored by Steve Kondik's avatar Steve Kondik
Browse files

telephony: Bring IMS in line with current relese

Revert "IMS: UT serviceClass"

 * Bring in line with upstream.

This reverts commit 8fb7b77c.

Revert "IMS: Supplementary services"

This reverts commit f3b55754.

Change-Id: Ib9ffff582246fdfe4dbc01b019fc39bbe78459f4
parent 95ca098d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -35,9 +35,6 @@ 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 NOTIFICATION_TYPE_MO = 0;
    static public final int NOTIFICATION_TYPE_MT = 1;

@@ -70,7 +67,6 @@ public class SuppServiceNotification {
            + (notificationType == NOTIFICATION_TYPE_MO ? " originated " : " terminated ")
            + " code: " + code
            + " index: " + index
            + " history: " + history
            + " \""
            + PhoneNumberUtils.stringFromStringAndTOA(number, type) + "\" ";
    }
+2 −17
Original line number Diff line number Diff line
@@ -803,18 +803,8 @@ public class ImsPhone extends ImsPhoneBase {
            String dialingNumber,
            int timerSeconds,
            Message onComplete) {
        setCallForwardingOption(commandInterfaceCFAction, commandInterfaceCFReason, dialingNumber,
                CommandsInterface.SERVICE_CLASS_VOICE, timerSeconds, onComplete);
    }

    public void setCallForwardingOption(int commandInterfaceCFAction,
            int commandInterfaceCFReason,
            String dialingNumber,
            int serviceClass,
            int timerSeconds,
            Message onComplete) {
        if (DBG) Rlog.d(LOG_TAG, "setCallForwardingOption action=" + commandInterfaceCFAction
                + ", reason=" + commandInterfaceCFReason + " serviceClass=" + serviceClass);
                + ", reason=" + commandInterfaceCFReason);
        if ((isValidCommandInterfaceCFAction(commandInterfaceCFAction)) &&
                (isValidCommandInterfaceCFReason(commandInterfaceCFReason))) {
            Message resp;
@@ -829,7 +819,6 @@ public class ImsPhone extends ImsPhoneBase {
                ut.updateCallForward(getActionFromCFAction(commandInterfaceCFAction),
                        getConditionFromCFReason(commandInterfaceCFReason),
                        dialingNumber,
                        serviceClass,
                        timerSeconds,
                        onComplete);
             } catch (ImsException e) {
@@ -888,17 +877,13 @@ public class ImsPhone extends ImsPhoneBase {

    @Override
    public void setCallWaiting(boolean enable, Message onComplete) {
        setCallWaiting(enable, CommandsInterface.SERVICE_CLASS_VOICE, onComplete);
    }

    public void setCallWaiting(boolean enable, int serviceClass, Message onComplete) {
        if (DBG) Rlog.d(LOG_TAG, "setCallWaiting enable=" + enable);
        Message resp;
        resp = obtainMessage(EVENT_SET_CALL_WAITING_DONE, onComplete);

        try {
            ImsUtInterface ut = mCT.getUtInterface();
            ut.updateCallWaiting(enable, serviceClass, resp);
            ut.updateCallWaiting(enable, resp);
        } catch (ImsException e) {
            sendErrorResponse(onComplete, e);
        }
+11 −13
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ 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;
@@ -1280,6 +1279,13 @@ 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
@@ -1293,20 +1299,12 @@ 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();
            supp.notificationType = suppServiceInfo.notificationType ;
            supp.code = suppServiceInfo.code;
            supp.index = suppServiceInfo.index;
            supp.number = suppServiceInfo.number;
            supp.history = suppServiceInfo.history;

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

+4 −5
Original line number Diff line number Diff line
@@ -782,10 +782,10 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode {
                throw new CallStateException(ImsPhone.CS_FALLBACK);
            } else if (isServiceCodeCallForwarding(mSc)) {
                Rlog.d(LOG_TAG, "is CF");
                // service group is not supported

                String dialingNumber = mSia;
                int reason = scToCallForwardReason(mSc);
                int serviceClass = siToServiceClass(mSib);
                int time = siToTime(mSic);

                if (isInterrogate()) {
@@ -806,7 +806,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode {

                    Rlog.d(LOG_TAG, "is CF setCallForward");
                    mPhone.setCallForwardingOption(cfAction, reason,
                            dialingNumber, serviceClass, time, obtainMessage(
                            dialingNumber, time, obtainMessage(
                                    EVENT_SET_CFF_COMPLETE,
                                    isSettingUnconditional,
                                    isEnableDesired, this));
@@ -1007,10 +1007,9 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode {
                }
            } else if (mSc != null && mSc.equals(SC_WAIT)) {
                // sia = basic service group
                int serviceClass = siToServiceClass(mSib);

                // service group is not supported
                if (isActivate() || isDeactivate()) {
                    mPhone.setCallWaiting(isActivate(), serviceClass,
                    mPhone.setCallWaiting(isActivate(),
                            obtainMessage(EVENT_SET_COMPLETE, this));
                } else if (isInterrogate()) {
                    mPhone.getCallWaiting(obtainMessage(EVENT_QUERY_COMPLETE, this));