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

Commit 2e8ded56 authored by Sarah Chin's avatar Sarah Chin Committed by Automerger Merge Worker
Browse files

Merge "Make PCC indication logic consistent between HIDL and AIDL" into tm-dev...

Merge "Make PCC indication logic consistent between HIDL and AIDL" into tm-dev am: f6525d58 am: b140ca7a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/17725712



Change-Id: I819f72ada1943b6fb93ec89eb5f7fa29e8bff33c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 732ebf2a b140ca7a
Loading
Loading
Loading
Loading
+34 −27
Original line number Diff line number Diff line
@@ -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()) {
@@ -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(
+2 −3
Original line number Diff line number Diff line
@@ -1238,9 +1238,8 @@ public class RadioIndication extends IRadioIndication.Stub {
                }
            }
        } catch (IllegalArgumentException iae) {
            AnomalyReporter.reportAnomaly(
                    UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"),
                    "Invalid PhysicalChannelConfig reported by HAL");
            AnomalyReporter.reportAnomaly(UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"),
                    "RIL reported invalid PCC (HIDL)");
            mRil.riljLoge("Invalid PhysicalChannelConfig " + iae);
            return;
        }
+6 −3
Original line number Diff line number Diff line
@@ -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;
@@ -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