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

Commit 5eb93305 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Set CDMA data roaming based on TSB58 roaming indicator if voice is not in service"

parents ac0cab0f 469d1d71
Loading
Loading
Loading
Loading
+21 −6
Original line number Diff line number Diff line
@@ -1647,12 +1647,27 @@ public class ServiceStateTracker extends Handler {
                if (mIsSubscriptionFromRuim) {
                    mNewSS.setVoiceRoaming(isRoamingBetweenOperators(mNewSS.getVoiceRoaming(), mNewSS));
                }
                // For CDMA, voice and data should have the same roaming status
                /**
                 * For CDMA, voice and data should have the same roaming status.
                 * If voice is not in service, use TSB58 roaming indicator to set
                 * data roaming status. If TSB58 roaming indicator is not in the
                 * carrier-specified list of ERIs for home system then set roaming.
                 */
                final int dataRat = mNewSS.getRilDataRadioTechnology();
                if (ServiceState.isCdma(dataRat)) {
                    final boolean isVoiceInService =
                            (mNewSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE);
                final int dataRegType = mNewSS.getRilDataRadioTechnology();
                if (isVoiceInService && ServiceState.isCdma(dataRegType)) {
                    if (isVoiceInService) {
                        mNewSS.setDataRoaming(mNewSS.getVoiceRoaming());
                    } else {
                        /**
                         * As per VoiceRegStateResult from radio types.hal the TSB58
                         * Roaming Indicator shall be sent if device is registered
                         * on a CDMA or EVDO system.
                         */
                        mNewSS.setDataRoaming(
                                !isRoamIndForHomeSystem(Integer.toString(mRoamingIndicator)));
                    }
                }

                // Setting SS CdmaRoamingIndicator and CdmaDefaultRoamingIndicator