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

Commit c90b06da authored by Kiwon Park's avatar Kiwon Park Committed by Gerrit Code Review
Browse files

Merge "Add carrer id in NetworkIndication anomaly reports."

parents 18de56de 8ec5872f
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.internal.telephony;

import static android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID;

import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_PRL_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CELL_INFO_LIST;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_LCEDATA_RECV;
@@ -73,7 +75,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
        mRil.processIndication(RIL.NETWORK_SERVICE, indicationType);

        if (cellIdentity == null || barringInfos == null) {
            AnomalyReporter.reportAnomaly(UUID.fromString("645b16bb-c930-4c1c-9c5d-568696542e05"),
            reportAnomaly(UUID.fromString("645b16bb-c930-4c1c-9c5d-568696542e05"),
                    "Invalid barringInfoChanged indication");
            mRil.riljLoge("Invalid barringInfoChanged indication");
            return;
@@ -171,7 +173,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
                        .build());
            }
        } catch (IllegalArgumentException iae) {
            AnomalyReporter.reportAnomaly(UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"),
            reportAnomaly(UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"),
                    "RIL reported invalid PCC (AIDL)");
            mRil.riljLoge("Invalid PhysicalChannelConfig " + iae);
            return;
@@ -261,7 +263,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
        // Ignore the NITZ if receivedTimeMs or ageMs is not a valid time.
        // e.g. receivedTimeMs is non-positive, ageMs is negative or greater than receivedTimeMs.
        if ((receivedTimeMs <= 0) || (ageMs < 0) || (ageMs >= receivedTimeMs)) {
            AnomalyReporter.reportAnomaly(UUID.fromString("fc7c56d4-485d-475a-aaff-394203c6cdfc"),
            reportAnomaly(UUID.fromString("fc7c56d4-485d-475a-aaff-394203c6cdfc"),
                    "NITZ indication with invalid parameter");

            mRil.riljLoge("NITZ parameter is invalid, ignoring nitzTimeReceived indication. "
@@ -308,7 +310,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
                || (domain & ~NetworkRegistrationInfo.DOMAIN_CS_PS) != 0
                || causeCode < 0 || additionalCauseCode < 0
                || (causeCode == Integer.MAX_VALUE && additionalCauseCode == Integer.MAX_VALUE)) {
            AnomalyReporter.reportAnomaly(UUID.fromString("f16e5703-6105-4341-9eb3-e68189156eb4"),
            reportAnomaly(UUID.fromString("f16e5703-6105-4341-9eb3-e68189156eb4"),
                    "Invalid registrationFailed indication");

            mRil.riljLoge("Invalid registrationFailed indication");
@@ -383,4 +385,10 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
    public int getInterfaceVersion() {
        return IRadioNetworkIndication.VERSION;
    }

    private void reportAnomaly(UUID uuid, String msg) {
        Phone phone = mRil.mPhoneId == null ? null : PhoneFactory.getPhone(mRil.mPhoneId);
        int carrierId = phone == null ? UNKNOWN_CARRIER_ID : phone.getCarrierId();
        AnomalyReporter.reportAnomaly(uuid, msg, carrierId);
    }
}