Loading src/java/com/android/internal/telephony/NetworkIndication.java +34 −27 Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub { android.hardware.radio.network.PhysicalChannelConfig[] configs) { mRil.processIndication(RIL.NETWORK_SERVICE, indicationType); List<PhysicalChannelConfig> response = new ArrayList<>(configs.length); try { for (android.hardware.radio.network.PhysicalChannelConfig config : configs) { PhysicalChannelConfig.Builder builder = new PhysicalChannelConfig.Builder(); switch (config.band.getTag()) { Loading Loading @@ -169,6 +170,12 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub { .setContextIds(config.contextIds) .build()); } } catch (IllegalArgumentException iae) { AnomalyReporter.reportAnomaly(UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"), "RIL reported invalid PCC (AIDL)"); mRil.riljLoge("Invalid PhysicalChannelConfig " + iae); return; } if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, response); mRil.mPhysicalChannelConfigurationRegistrants.notifyRegistrants( Loading src/java/com/android/internal/telephony/RadioIndication.java +1 −1 Original line number Diff line number Diff line Loading @@ -1241,7 +1241,7 @@ public class RadioIndication extends IRadioIndication.Stub { } } catch (IllegalArgumentException iae) { reportAnomaly(UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"), "Invalid PhysicalChannelConfig reported by HAL"); "RIL reported invalid PCC (HIDL)"); mRil.riljLoge("Invalid PhysicalChannelConfig " + iae); return; } Loading tests/telephonytests/src/com/android/internal/telephony/PhysicalChannelConfigTest.java +6 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.internal.telephony; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.fail; import android.os.Parcel; import android.telephony.AccessNetworkConstants; import android.telephony.PhysicalChannelConfig; Loading Loading @@ -128,9 +130,10 @@ public class PhysicalChannelConfigTest { @Test public void testFrequencyRangeWithoutBand() { try { setUpPhysicalChannelConfig(NETWORK_TYPE_UMTS, 0, CHANNEL_NUMBER, CHANNEL_NUMBER, -1); assertThat(mPhysicalChannelConfig.getFrequencyRange()) .isEqualTo(ServiceState.FREQUENCY_RANGE_UNKNOWN); fail(); } catch (IllegalArgumentException expected) { } } @Test Loading Loading
src/java/com/android/internal/telephony/NetworkIndication.java +34 −27 Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub { android.hardware.radio.network.PhysicalChannelConfig[] configs) { mRil.processIndication(RIL.NETWORK_SERVICE, indicationType); List<PhysicalChannelConfig> response = new ArrayList<>(configs.length); try { for (android.hardware.radio.network.PhysicalChannelConfig config : configs) { PhysicalChannelConfig.Builder builder = new PhysicalChannelConfig.Builder(); switch (config.band.getTag()) { Loading Loading @@ -169,6 +170,12 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub { .setContextIds(config.contextIds) .build()); } } catch (IllegalArgumentException iae) { AnomalyReporter.reportAnomaly(UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"), "RIL reported invalid PCC (AIDL)"); mRil.riljLoge("Invalid PhysicalChannelConfig " + iae); return; } if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, response); mRil.mPhysicalChannelConfigurationRegistrants.notifyRegistrants( Loading
src/java/com/android/internal/telephony/RadioIndication.java +1 −1 Original line number Diff line number Diff line Loading @@ -1241,7 +1241,7 @@ public class RadioIndication extends IRadioIndication.Stub { } } catch (IllegalArgumentException iae) { reportAnomaly(UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"), "Invalid PhysicalChannelConfig reported by HAL"); "RIL reported invalid PCC (HIDL)"); mRil.riljLoge("Invalid PhysicalChannelConfig " + iae); return; } Loading
tests/telephonytests/src/com/android/internal/telephony/PhysicalChannelConfigTest.java +6 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.internal.telephony; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.fail; import android.os.Parcel; import android.telephony.AccessNetworkConstants; import android.telephony.PhysicalChannelConfig; Loading Loading @@ -128,9 +130,10 @@ public class PhysicalChannelConfigTest { @Test public void testFrequencyRangeWithoutBand() { try { setUpPhysicalChannelConfig(NETWORK_TYPE_UMTS, 0, CHANNEL_NUMBER, CHANNEL_NUMBER, -1); assertThat(mPhysicalChannelConfig.getFrequencyRange()) .isEqualTo(ServiceState.FREQUENCY_RANGE_UNKNOWN); fail(); } catch (IllegalArgumentException expected) { } } @Test Loading