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

Commit 768f9320 authored by Nathan Harold's avatar Nathan Harold
Browse files

Report an Anomaly for missing RegDenied Reason

Add an anomaly report to detect when reg is reported
as denied, but there is no reason associated with the
reg denied state.

Bug: 232255564
Test: compilation
Change-Id: Ib2e2853c39a74700233e3411b4f1c5cc037f6e66
parent b1848411
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -500,6 +500,14 @@ public class CellularNetworkService extends NetworkService {
            final String rplmn = regResult.registeredPlmn;
            final int reasonForDenial = regResult.reasonForDenial;

            if (regState == NetworkRegistrationInfo.REGISTRATION_STATE_DENIED
                    && reasonForDenial
                    == android.hardware.radio.network.RegistrationFailCause.NONE) {
                AnomalyReporter.reportAnomaly(
                        UUID.fromString("62ed270f-e139-418a-a427-8bcc1bca8f20"),
                            "RIL Missing Reg Fail Reason", mPhone.getCarrierId());
            }

            int networkType = ServiceState.rilRadioTechnologyToNetworkType(regResult.rat);
            if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
                networkType = TelephonyManager.NETWORK_TYPE_LTE;
@@ -582,6 +590,14 @@ public class CellularNetworkService extends NetworkService {
            networkType =
                    getNetworkTypeForCellIdentity(networkType, cellIdentity, mPhone.getCarrierId());

            if (regState == NetworkRegistrationInfo.REGISTRATION_STATE_DENIED
                    && reasonForDenial
                    == android.hardware.radio.network.RegistrationFailCause.NONE) {
                AnomalyReporter.reportAnomaly(
                        UUID.fromString("62ed270f-e139-418a-a427-8bcc1bca8f20"),
                            "RIL Missing Reg Fail Reason", mPhone.getCarrierId());
            }

            // Conditional parameters for specific RANs
            boolean cssSupported = false;
            int roamingIndicator = 0;