Search in sources :

Example 1 with RilDataCall

use of com.android.internal.telephony.nano.TelephonyProto.RilDataCall in project android_frameworks_opt_telephony by LineageOS.

the class TelephonyMetrics method writeRilDataCallList.

/**
 * Write get data call list event
 *
 * @param phoneId Phone id
 * @param dcsList Data call list
 */
public void writeRilDataCallList(int phoneId, ArrayList<DataCallResponse> dcsList) {
    RilDataCall[] dataCalls = new RilDataCall[dcsList.size()];
    for (int i = 0; i < dcsList.size(); i++) {
        dataCalls[i] = new RilDataCall();
        dataCalls[i].cid = dcsList.get(i).cid;
        if (!TextUtils.isEmpty(dcsList.get(i).ifname)) {
            dataCalls[i].iframe = dcsList.get(i).ifname;
        }
        if (!TextUtils.isEmpty(dcsList.get(i).type)) {
            dataCalls[i].type = toPdpType(dcsList.get(i).type);
        }
    }
    addTelephonyEvent(new TelephonyEventBuilder(phoneId).setDataCalls(dataCalls).build());
}
Also used : RilDataCall(com.android.internal.telephony.nano.TelephonyProto.RilDataCall)

Example 2 with RilDataCall

use of com.android.internal.telephony.nano.TelephonyProto.RilDataCall in project android_frameworks_opt_telephony by LineageOS.

the class TelephonyMetrics method writeOnSetupDataCallResponse.

/**
 * Write setup data call response event
 *
 * @param phoneId Phone id
 * @param rilSerial RIL request serial number
 * @param rilError RIL error
 * @param rilRequest RIL request
 * @param response Data call response
 */
private void writeOnSetupDataCallResponse(int phoneId, int rilSerial, int rilError, int rilRequest, DataCallResponse response) {
    RilSetupDataCallResponse setupDataCallResponse = new RilSetupDataCallResponse();
    RilDataCall dataCall = new RilDataCall();
    if (response != null) {
        setupDataCallResponse.status = (response.status == 0 ? RilDataCallFailCause.PDP_FAIL_NONE : response.status);
        setupDataCallResponse.suggestedRetryTimeMillis = response.suggestedRetryTime;
        dataCall.cid = response.cid;
        if (!TextUtils.isEmpty(response.type)) {
            dataCall.type = toPdpType(response.type);
        }
        if (!TextUtils.isEmpty(response.ifname)) {
            dataCall.iframe = response.ifname;
        }
    }
    setupDataCallResponse.call = dataCall;
    addTelephonyEvent(new TelephonyEventBuilder(phoneId).setSetupDataCallResponse(setupDataCallResponse).build());
}
Also used : RilDataCall(com.android.internal.telephony.nano.TelephonyProto.RilDataCall) RilSetupDataCallResponse(com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent.RilSetupDataCallResponse)

Aggregations

RilDataCall (com.android.internal.telephony.nano.TelephonyProto.RilDataCall)2 RilSetupDataCallResponse (com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent.RilSetupDataCallResponse)1