Search in sources :

Example 1 with RilSetupDataCallResponse

use of com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent.RilSetupDataCallResponse 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)1 RilSetupDataCallResponse (com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent.RilSetupDataCallResponse)1