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

Commit f29fa905 authored by Nathan Harold's avatar Nathan Harold Committed by Jack Yu
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.

Used a new UUID for U.

Bug: 232255564
Test: compilation
Change-Id: Ib2e2853c39a74700233e3411b4f1c5cc037f6e66
parent d5210a5d
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -504,6 +504,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-8bcc1bca8f21"),
                            "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;
@@ -606,6 +614,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-8bcc1bca8f21"),
                            "RIL Missing Reg Fail Reason", mPhone.getCarrierId());
            }

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