use of android.hardware.radio.V1_0.CdmaBroadcastSmsConfigInfo 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);
}
}
}
Aggregations