use of android.hardware.radio.V1_0.GsmBroadcastSmsConfigInfo in project android_frameworks_opt_telephony by LineageOS.
the class RIL method setGsmBroadcastConfig.
@Override
public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_GSM_SET_BROADCAST_CONFIG, result, mRILDefaultWorkSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " with " + config.length + " configs : ");
for (int i = 0; i < config.length; i++) {
riljLog(config[i].toString());
}
}
ArrayList<GsmBroadcastSmsConfigInfo> configs = new ArrayList<>();
int numOfConfig = config.length;
GsmBroadcastSmsConfigInfo info;
for (int i = 0; i < numOfConfig; i++) {
info = new GsmBroadcastSmsConfigInfo();
info.fromServiceId = config[i].getFromServiceId();
info.toServiceId = config[i].getToServiceId();
info.fromCodeScheme = config[i].getFromCodeScheme();
info.toCodeScheme = config[i].getToCodeScheme();
info.selected = config[i].isSelected();
configs.add(info);
}
try {
radioProxy.setGsmBroadcastConfig(rr.mSerial, configs);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "setGsmBroadcastConfig", e);
}
}
}
Aggregations