Search in sources :

Example 1 with SsData

use of com.android.internal.telephony.gsm.SsData in project android_frameworks_opt_telephony by LineageOS.

the class RadioIndication method onSupplementaryServiceIndication.

public void onSupplementaryServiceIndication(int indicationType, StkCcUnsolSsResult ss) {
    mRil.processIndication(indicationType);
    int num;
    SsData ssData = new SsData();
    ssData.serviceType = ssData.ServiceTypeFromRILInt(ss.serviceType);
    ssData.requestType = ssData.RequestTypeFromRILInt(ss.requestType);
    ssData.teleserviceType = ssData.TeleserviceTypeFromRILInt(ss.teleserviceType);
    // This is service class sent in the SS request.
    ssData.serviceClass = ss.serviceClass;
    // This is the result of the SS request.
    ssData.result = ss.result;
    if (ssData.serviceType.isTypeCF() && ssData.requestType.isTypeInterrogation()) {
        CfData cfData = ss.cfData.get(0);
        num = cfData.cfInfo.size();
        ssData.cfInfo = new CallForwardInfo[num];
        for (int i = 0; i < num; i++) {
            android.hardware.radio.V1_0.CallForwardInfo cfInfo = cfData.cfInfo.get(i);
            ssData.cfInfo[i] = new CallForwardInfo();
            ssData.cfInfo[i].status = cfInfo.status;
            ssData.cfInfo[i].reason = cfInfo.reason;
            ssData.cfInfo[i].serviceClass = cfInfo.serviceClass;
            ssData.cfInfo[i].toa = cfInfo.toa;
            ssData.cfInfo[i].number = cfInfo.number;
            ssData.cfInfo[i].timeSeconds = cfInfo.timeSeconds;
            mRil.riljLog("[SS Data] CF Info " + i + " : " + ssData.cfInfo[i]);
        }
    } else {
        SsInfoData ssInfo = ss.ssInfo.get(0);
        num = ssInfo.ssInfo.size();
        ssData.ssInfo = new int[num];
        for (int i = 0; i < num; i++) {
            ssData.ssInfo[i] = ssInfo.ssInfo.get(i);
            mRil.riljLog("[SS Data] SS Info " + i + " : " + ssData.ssInfo[i]);
        }
    }
    if (RIL.RILJ_LOGD)
        mRil.unsljLogRet(RIL_UNSOL_ON_SS, ssData);
    if (mRil.mSsRegistrant != null) {
        mRil.mSsRegistrant.notifyRegistrant(new AsyncResult(null, ssData, null));
    }
}
Also used : SsInfoData(android.hardware.radio.V1_0.SsInfoData) SsData(com.android.internal.telephony.gsm.SsData) AsyncResult(android.os.AsyncResult) CfData(android.hardware.radio.V1_0.CfData)

Aggregations

CfData (android.hardware.radio.V1_0.CfData)1 SsInfoData (android.hardware.radio.V1_0.SsInfoData)1 AsyncResult (android.os.AsyncResult)1 SsData (com.android.internal.telephony.gsm.SsData)1