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());
}
Aggregations