Search in sources :

Example 1 with ImsCallForwardInfo

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

the class ImsPhone method handleCfQueryResult.

private CallForwardInfo[] handleCfQueryResult(ImsCallForwardInfo[] infos) {
    CallForwardInfo[] cfInfos = null;
    if (infos != null && infos.length != 0) {
        cfInfos = new CallForwardInfo[infos.length];
    }
    IccRecords r = mDefaultPhone.getIccRecords();
    if (infos == null || infos.length == 0) {
        if (r != null) {
            // Assume the default is not active
            // Set unconditional CFF in SIM to false
            setVoiceCallForwardingFlag(r, 1, false, null);
        }
    } else {
        for (int i = 0, s = infos.length; i < s; i++) {
            if (infos[i].mCondition == ImsUtInterface.CDIV_CF_UNCONDITIONAL) {
                if (r != null) {
                    setVoiceCallForwardingFlag(r, 1, (infos[i].mStatus == 1), infos[i].mNumber);
                }
            }
            cfInfos[i] = getCallForwardInfo(infos[i]);
        }
    }
    return cfInfos;
}
Also used : IccRecords(com.android.internal.telephony.uicc.IccRecords) ImsCallForwardInfo(com.android.ims.ImsCallForwardInfo) CallForwardInfo(com.android.internal.telephony.CallForwardInfo)

Aggregations

ImsCallForwardInfo (com.android.ims.ImsCallForwardInfo)1 CallForwardInfo (com.android.internal.telephony.CallForwardInfo)1 IccRecords (com.android.internal.telephony.uicc.IccRecords)1