Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b491ce86 authored by Jack Yu's avatar Jack Yu Committed by Gerrit Code Review
Browse files

Merge "Catch IAE from Invalid PCC Report by Modem"

parents 291f4a38 c56f6800
Loading
Loading
Loading
Loading
+49 −39
Original line number Diff line number Diff line
@@ -1275,6 +1275,7 @@ public class RadioIndication extends IRadioIndication.Stub {

    private void physicalChannelConfigsIndication(List<? extends Object> configs) {
        List<PhysicalChannelConfig> response = new ArrayList<>(configs.size());
        try {
            for (Object obj : configs) {
                if (obj instanceof android.hardware.radio.V1_2.PhysicalChannelConfig) {
                    android.hardware.radio.V1_2.PhysicalChannelConfig config =
@@ -1293,7 +1294,8 @@ public class RadioIndication extends IRadioIndication.Stub {
                    response.add(builder.setCellConnectionStatus(
                            convertConnectionStatusFromCellConnectionStatus(config.base.status))
                            .setCellBandwidthDownlinkKhz(config.base.cellBandwidthDownlink)
                        .setNetworkType(ServiceState.rilRadioTechnologyToNetworkType(config.rat))
                            .setNetworkType(
                                    ServiceState.rilRadioTechnologyToNetworkType(config.rat))
                            .setPhysicalCellId(config.physicalCellId)
                            .setContextIds(config.contextIds.stream().mapToInt(x -> x).toArray())
                            .build());
@@ -1308,7 +1310,8 @@ public class RadioIndication extends IRadioIndication.Stub {
                            .setUplinkChannelNumber(config.uplinkChannelNumber)
                            .setCellBandwidthDownlinkKhz(config.cellBandwidthDownlinkKhz)
                            .setCellBandwidthUplinkKhz(config.cellBandwidthUplinkKhz)
                        .setNetworkType(ServiceState.rilRadioTechnologyToNetworkType(config.rat))
                            .setNetworkType(
                                    ServiceState.rilRadioTechnologyToNetworkType(config.rat))
                            .setPhysicalCellId(config.physicalCellId)
                            .setContextIds(config.contextIds.stream().mapToInt(x -> x).toArray())
                            .build());
@@ -1316,6 +1319,13 @@ public class RadioIndication extends IRadioIndication.Stub {
                    mRil.riljLoge("Unsupported PhysicalChannelConfig " + obj);
                }
            }
        } catch (IllegalArgumentException iae) {
            AnomalyReporter.reportAnomaly(
                    UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"),
                    "Invalid PhysicalChannelConfig reported by HAL");
            mRil.riljLoge("Invalid PhysicalChannelConfig " + iae);
            return;
        }

        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, response);