Search in sources :

Example 1 with ImsUtInterface

use of com.android.ims.ImsUtInterface in project android_frameworks_opt_telephony by LineageOS.

the class ImsPhone method getCallForwardingOption.

@Override
public void getCallForwardingOption(int commandInterfaceCFReason, Message onComplete) {
    if (DBG)
        Rlog.d(LOG_TAG, "getCallForwardingOption reason=" + commandInterfaceCFReason);
    if (isValidCommandInterfaceCFReason(commandInterfaceCFReason)) {
        if (DBG)
            Rlog.d(LOG_TAG, "requesting call forwarding query.");
        Message resp;
        resp = obtainMessage(EVENT_GET_CALL_FORWARD_DONE, onComplete);
        try {
            ImsUtInterface ut = mCT.getUtInterface();
            ut.queryCallForward(getConditionFromCFReason(commandInterfaceCFReason), null, resp);
        } catch (ImsException e) {
            sendErrorResponse(onComplete, e);
        }
    } else if (onComplete != null) {
        sendErrorResponse(onComplete);
    }
}
Also used : Message(android.os.Message) ImsUtInterface(com.android.ims.ImsUtInterface) ImsException(com.android.ims.ImsException)

Example 2 with ImsUtInterface

use of com.android.ims.ImsUtInterface in project android_frameworks_opt_telephony by LineageOS.

the class ImsPhone method getCallWaiting.

@Override
public void getCallWaiting(Message onComplete) {
    if (DBG)
        Rlog.d(LOG_TAG, "getCallWaiting");
    Message resp;
    resp = obtainMessage(EVENT_GET_CALL_WAITING_DONE, onComplete);
    try {
        ImsUtInterface ut = mCT.getUtInterface();
        ut.queryCallWaiting(resp);
    } catch (ImsException e) {
        sendErrorResponse(onComplete, e);
    }
}
Also used : Message(android.os.Message) ImsUtInterface(com.android.ims.ImsUtInterface) ImsException(com.android.ims.ImsException)

Example 3 with ImsUtInterface

use of com.android.ims.ImsUtInterface in project android_frameworks_opt_telephony by LineageOS.

the class ImsPhone method setCallWaiting.

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);
    } catch (ImsException e) {
        sendErrorResponse(onComplete, e);
    }
}
Also used : Message(android.os.Message) ImsUtInterface(com.android.ims.ImsUtInterface) ImsException(com.android.ims.ImsException)

Example 4 with ImsUtInterface

use of com.android.ims.ImsUtInterface in project android_frameworks_opt_telephony by LineageOS.

the class ImsPhone method getOutgoingCallerIdDisplay.

@Override
public void getOutgoingCallerIdDisplay(Message onComplete) {
    if (DBG)
        Rlog.d(LOG_TAG, "getCLIR");
    Message resp;
    resp = obtainMessage(EVENT_GET_CLIR_DONE, onComplete);
    try {
        ImsUtInterface ut = mCT.getUtInterface();
        ut.queryCLIR(resp);
    } catch (ImsException e) {
        sendErrorResponse(onComplete, e);
    }
}
Also used : Message(android.os.Message) ImsUtInterface(com.android.ims.ImsUtInterface) ImsException(com.android.ims.ImsException)

Example 5 with ImsUtInterface

use of com.android.ims.ImsUtInterface in project android_frameworks_opt_telephony by LineageOS.

the class ImsPhone method setCallForwardingOption.

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);
    if ((isValidCommandInterfaceCFAction(commandInterfaceCFAction)) && (isValidCommandInterfaceCFReason(commandInterfaceCFReason))) {
        Message resp;
        Cf cf = new Cf(dialingNumber, (commandInterfaceCFReason == CF_REASON_UNCONDITIONAL ? true : false), onComplete);
        resp = obtainMessage(EVENT_SET_CALL_FORWARD_DONE, isCfEnable(commandInterfaceCFAction) ? 1 : 0, 0, cf);
        try {
            ImsUtInterface ut = mCT.getUtInterface();
            ut.updateCallForward(getActionFromCFAction(commandInterfaceCFAction), getConditionFromCFReason(commandInterfaceCFReason), dialingNumber, serviceClass, timerSeconds, resp);
        } catch (ImsException e) {
            sendErrorResponse(onComplete, e);
        }
    } else if (onComplete != null) {
        sendErrorResponse(onComplete);
    }
}
Also used : Message(android.os.Message) ImsUtInterface(com.android.ims.ImsUtInterface) ImsException(com.android.ims.ImsException)

Aggregations

Message (android.os.Message)8 ImsException (com.android.ims.ImsException)8 ImsUtInterface (com.android.ims.ImsUtInterface)8