use of com.android.internal.telephony.RILConstants.RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method physicalChannelConfigsIndication.
private void physicalChannelConfigsIndication(List<? extends Object> configs) {
List<PhysicalChannelConfig> response = new ArrayList<>(configs.size());
for (Object obj : configs) {
if (obj instanceof android.hardware.radio.V1_2.PhysicalChannelConfig) {
android.hardware.radio.V1_2.PhysicalChannelConfig config = (android.hardware.radio.V1_2.PhysicalChannelConfig) obj;
response.add(new PhysicalChannelConfig.Builder().setCellConnectionStatus(convertConnectionStatusFromCellConnectionStatus(config.status)).setCellBandwidthDownlinkKhz(config.cellBandwidthDownlink).build());
} else if (obj instanceof android.hardware.radio.V1_4.PhysicalChannelConfig) {
android.hardware.radio.V1_4.PhysicalChannelConfig config = (android.hardware.radio.V1_4.PhysicalChannelConfig) obj;
PhysicalChannelConfig.Builder builder = new PhysicalChannelConfig.Builder();
setFrequencyRangeOrChannelNumber(builder, config);
response.add(builder.setCellConnectionStatus(convertConnectionStatusFromCellConnectionStatus(config.base.status)).setCellBandwidthDownlinkKhz(config.base.cellBandwidthDownlink).setRat(ServiceState.rilRadioTechnologyToNetworkType(config.rat)).setPhysicalCellId(config.physicalCellId).setContextIds(config.contextIds.stream().mapToInt(x -> x).toArray()).build());
} else {
mRil.riljLoge("Unsupported PhysicalChannelConfig " + obj);
}
}
if (RIL.RILJ_LOGD)
mRil.unsljLogRet(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, response);
mRil.mPhysicalChannelConfigurationRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
Aggregations