use of android.hardware.radio.V1_0.CdmaT53AudioControlInfoRecord in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method cdmaInfoRec.
public void cdmaInfoRec(int indicationType, android.hardware.radio.V1_0.CdmaInformationRecords records) {
mRil.processIndication(indicationType);
int numberOfInfoRecs = records.infoRec.size();
for (int i = 0; i < numberOfInfoRecs; i++) {
CdmaInformationRecord record = records.infoRec.get(i);
int id = record.name;
CdmaInformationRecords cdmaInformationRecords;
switch(id) {
case CdmaInformationRecords.RIL_CDMA_DISPLAY_INFO_REC:
case CdmaInformationRecords.RIL_CDMA_EXTENDED_DISPLAY_INFO_REC:
CdmaInformationRecords.CdmaDisplayInfoRec cdmaDisplayInfoRec = new CdmaInformationRecords.CdmaDisplayInfoRec(id, record.display.get(0).alphaBuf);
cdmaInformationRecords = new CdmaInformationRecords(cdmaDisplayInfoRec);
break;
case CdmaInformationRecords.RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC:
case CdmaInformationRecords.RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC:
case CdmaInformationRecords.RIL_CDMA_CONNECTED_NUMBER_INFO_REC:
CdmaNumberInfoRecord numInfoRecord = record.number.get(0);
CdmaInformationRecords.CdmaNumberInfoRec cdmaNumberInfoRec = new CdmaInformationRecords.CdmaNumberInfoRec(id, numInfoRecord.number, numInfoRecord.numberType, numInfoRecord.numberPlan, numInfoRecord.pi, numInfoRecord.si);
cdmaInformationRecords = new CdmaInformationRecords(cdmaNumberInfoRec);
break;
case CdmaInformationRecords.RIL_CDMA_SIGNAL_INFO_REC:
CdmaSignalInfoRecord signalInfoRecord = record.signal.get(0);
CdmaInformationRecords.CdmaSignalInfoRec cdmaSignalInfoRec = new CdmaInformationRecords.CdmaSignalInfoRec(signalInfoRecord.isPresent ? 1 : 0, signalInfoRecord.signalType, signalInfoRecord.alertPitch, signalInfoRecord.signal);
cdmaInformationRecords = new CdmaInformationRecords(cdmaSignalInfoRec);
break;
case CdmaInformationRecords.RIL_CDMA_REDIRECTING_NUMBER_INFO_REC:
CdmaRedirectingNumberInfoRecord redirectingNumberInfoRecord = record.redir.get(0);
CdmaInformationRecords.CdmaRedirectingNumberInfoRec cdmaRedirectingNumberInfoRec = new CdmaInformationRecords.CdmaRedirectingNumberInfoRec(redirectingNumberInfoRecord.redirectingNumber.number, redirectingNumberInfoRecord.redirectingNumber.numberType, redirectingNumberInfoRecord.redirectingNumber.numberPlan, redirectingNumberInfoRecord.redirectingNumber.pi, redirectingNumberInfoRecord.redirectingNumber.si, redirectingNumberInfoRecord.redirectingReason);
cdmaInformationRecords = new CdmaInformationRecords(cdmaRedirectingNumberInfoRec);
break;
case CdmaInformationRecords.RIL_CDMA_LINE_CONTROL_INFO_REC:
CdmaLineControlInfoRecord lineControlInfoRecord = record.lineCtrl.get(0);
CdmaInformationRecords.CdmaLineControlInfoRec cdmaLineControlInfoRec = new CdmaInformationRecords.CdmaLineControlInfoRec(lineControlInfoRecord.lineCtrlPolarityIncluded, lineControlInfoRecord.lineCtrlToggle, lineControlInfoRecord.lineCtrlReverse, lineControlInfoRecord.lineCtrlPowerDenial);
cdmaInformationRecords = new CdmaInformationRecords(cdmaLineControlInfoRec);
break;
case CdmaInformationRecords.RIL_CDMA_T53_CLIR_INFO_REC:
CdmaInformationRecords.CdmaT53ClirInfoRec cdmaT53ClirInfoRec = new CdmaInformationRecords.CdmaT53ClirInfoRec(record.clir.get(0).cause);
cdmaInformationRecords = new CdmaInformationRecords(cdmaT53ClirInfoRec);
break;
case CdmaInformationRecords.RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC:
CdmaT53AudioControlInfoRecord audioControlInfoRecord = record.audioCtrl.get(0);
CdmaInformationRecords.CdmaT53AudioControlInfoRec cdmaT53AudioControlInfoRec = new CdmaInformationRecords.CdmaT53AudioControlInfoRec(audioControlInfoRecord.upLink, audioControlInfoRecord.downLink);
cdmaInformationRecords = new CdmaInformationRecords(cdmaT53AudioControlInfoRec);
break;
default:
throw new RuntimeException("RIL_UNSOL_CDMA_INFO_REC: unsupported record. Got " + CdmaInformationRecords.idToString(id) + " ");
}
if (RIL.RILJ_LOGD)
mRil.unsljLogRet(RIL_UNSOL_CDMA_INFO_REC, cdmaInformationRecords);
mRil.notifyRegistrantsCdmaInfoRec(cdmaInformationRecords);
}
}
Aggregations