use of android.hardware.radio.V1_5.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method nvReadItem.
@Override
public void nvReadItem(int itemID, Message result, WorkSource workSource) {
workSource = getDeafultWorkSourceIfInvalid(workSource);
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_NV_READ_ITEM, result, workSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " itemId = " + itemID);
}
try {
radioProxy.nvReadItem(rr.mSerial, itemID);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "nvReadItem", e);
}
}
}
use of android.hardware.radio.V1_5.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method setCdmaBroadcastConfig.
@Override
public void setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG, result, mRILDefaultWorkSource);
ArrayList<CdmaBroadcastSmsConfigInfo> halConfigs = new ArrayList<>();
for (CdmaSmsBroadcastConfigInfo config : configs) {
for (int i = config.getFromServiceCategory(); i <= config.getToServiceCategory(); i++) {
CdmaBroadcastSmsConfigInfo info = new CdmaBroadcastSmsConfigInfo();
info.serviceCategory = i;
info.language = config.getLanguage();
info.selected = config.isSelected();
halConfigs.add(info);
}
}
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " with " + halConfigs.size() + " configs : ");
for (CdmaBroadcastSmsConfigInfo config : halConfigs) {
riljLog(config.toString());
}
}
try {
radioProxy.setCdmaBroadcastConfig(rr.mSerial, halConfigs);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "setCdmaBroadcastConfig", e);
}
}
}
use of android.hardware.radio.V1_5.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method getVoiceRegistrationState.
@Override
public void getVoiceRegistrationState(Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_VOICE_REGISTRATION_STATE, result, mRILDefaultWorkSource);
if (RILJ_LOGD)
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
HalVersion overrideHalVersion = getCompatVersion(RIL_REQUEST_VOICE_REGISTRATION_STATE);
if (RILJ_LOGD) {
riljLog("getVoiceRegistrationState: overrideHalVersion=" + overrideHalVersion);
}
if ((overrideHalVersion == null || overrideHalVersion.greaterOrEqual(RADIO_HAL_VERSION_1_5)) && mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_5)) {
final android.hardware.radio.V1_5.IRadio radioProxy15 = (android.hardware.radio.V1_5.IRadio) radioProxy;
try {
radioProxy15.getVoiceRegistrationState_1_5(rr.mSerial);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "getVoiceRegistrationState_1_5", e);
}
} else {
try {
radioProxy.getVoiceRegistrationState(rr.mSerial);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "getVoiceRegistrationState", e);
}
}
}
}
use of android.hardware.radio.V1_5.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method setUnsolResponseFilter.
@Override
public void setUnsolResponseFilter(int filter, Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER, result, mRILDefaultWorkSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + filter);
}
if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_5)) {
try {
android.hardware.radio.V1_5.IRadio radioProxy15 = (android.hardware.radio.V1_5.IRadio) radioProxy;
filter &= INDICATION_FILTERS_ALL_V1_5;
radioProxy15.setIndicationFilter_1_5(rr.mSerial, filter);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "setIndicationFilter_1_5", e);
}
} else if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_2)) {
try {
android.hardware.radio.V1_2.IRadio radioProxy12 = (android.hardware.radio.V1_2.IRadio) radioProxy;
filter &= INDICATION_FILTERS_ALL_V1_2;
radioProxy12.setIndicationFilter_1_2(rr.mSerial, filter);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "setIndicationFilter_1_2", e);
}
} else {
try {
filter &= INDICATION_FILTERS_ALL_V1_0;
radioProxy.setIndicationFilter(rr.mSerial, filter);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "setIndicationFilter", e);
}
}
}
}
use of android.hardware.radio.V1_5.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method setCellInfoListRate.
@Override
public void setCellInfoListRate(int rateInMillis, Message result, WorkSource workSource) {
workSource = getDeafultWorkSourceIfInvalid(workSource);
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE, result, workSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " rateInMillis = " + rateInMillis);
}
try {
radioProxy.setCellInfoListRate(rr.mSerial, rateInMillis);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "setCellInfoListRate", e);
}
}
}
Aggregations