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

Commit b64c98a3 authored by Nathan Harold's avatar Nathan Harold
Browse files

Fix Typo in VoiceRegResult

When building a voice registration state result, there
was a typo causing the method to try and build a DataRegResult.
This causes a crash if anybody checks voice reg specific fields.

Bug: 153944103
Test: compilation (trivial)
Change-Id: Id0170888537c61ef6e07f01869029d72676d5406
parent 6a51c683
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -214,14 +214,14 @@ public class CellularNetworkService extends NetworkService {
        }

        private NetworkRegistrationInfo createRegistrationStateFromVoiceRegState(Object result) {
            int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN;
            int domain = NetworkRegistrationInfo.DOMAIN_CS;
            final int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN;
            final int domain = NetworkRegistrationInfo.DOMAIN_CS;

            // 1.5 at the top so that we can do an "early exit" from the method
            if (result instanceof android.hardware.radio.V1_5.RegStateResult) {
                return getNetworkRegistrationInfo(
                        NetworkRegistrationInfo.DOMAIN_PS,
                        AccessNetworkConstants.TRANSPORT_TYPE_WWAN,
                        domain,
                        transportType,
                        (android.hardware.radio.V1_5.RegStateResult) result);
            } else if (result instanceof android.hardware.radio.V1_0.VoiceRegStateResult) {
                android.hardware.radio.V1_0.VoiceRegStateResult voiceRegState =
@@ -275,9 +275,10 @@ public class CellularNetworkService extends NetworkService {
        }

        private NetworkRegistrationInfo createRegistrationStateFromDataRegState(Object result) {
            int domain = NetworkRegistrationInfo.DOMAIN_PS;
            final int domain = NetworkRegistrationInfo.DOMAIN_PS;
            final int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN;

            int regState = NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN;
            int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN;
            int networkType = TelephonyManager.NETWORK_TYPE_UNKNOWN;
            int reasonForDenial = 0;
            boolean isUsingCarrierAggregation = false;
@@ -295,8 +296,8 @@ public class CellularNetworkService extends NetworkService {
            // 1.5 at the top so that we can do an "early exit" from the method
            if (result instanceof android.hardware.radio.V1_5.RegStateResult) {
                return getNetworkRegistrationInfo(
                        NetworkRegistrationInfo.DOMAIN_PS,
                        AccessNetworkConstants.TRANSPORT_TYPE_WWAN,
                        domain,
                        transportType,
                        (android.hardware.radio.V1_5.RegStateResult) result);
            } else if (result instanceof android.hardware.radio.V1_0.DataRegStateResult) {
                android.hardware.radio.V1_0.DataRegStateResult dataRegState =