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

Commit 777bd616 authored by Uma Maheswari Ramalingam's avatar Uma Maheswari Ramalingam Committed by Linux Build Service Account
Browse files

Fix for data and roaming icons

- Display data icon independent of voice service state
i.e even if voice network is unavailable

- Show cdma roaming indicators if either voice
or data is roaming.

- Cleanup roaming indicator default values.
Set default CDMA Eri index to roaming off

Change-Id: I915421a6f5906d80ed5b8dd9c433115ad5df1f14
CRs-Fixed: 285986, 303275, 326204, 326634, 333008, 339297
parent a7d9eb03
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -240,6 +240,9 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
                        + " regState=" + regState
                        + " dataRadioTechnology=" + type);
            }
            mDataRoaming = regCodeIsRoaming(regState);

            if (mDataRoaming) mNewSS.setRoaming(true);
        } else {
            super.handlePollStateResultMessage(what, ar);
        }
@@ -428,7 +431,8 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
                String eriText;
                // Now the CDMAPhone sees the new ServiceState so it can get the
                // new ERI text
                if (mSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE) {
                if (mSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE ||
                        (mSS.getDataRegState() == ServiceState.STATE_IN_SERVICE)) {
                    eriText = mPhone.getCdmaEriText();
                } else if (mSS.getVoiceRegState() == ServiceState.STATE_POWER_OFF) {
                    eriText = (mIccRecords != null) ? mIccRecords.getServiceProviderName() : null;
+8 −7
Original line number Diff line number Diff line
@@ -100,9 +100,10 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
            NITZ_UPDATE_DIFF_DEFAULT);

    private boolean mCdmaRoaming = false;
    private int mRoamingIndicator;
    protected boolean mDataRoaming = false;
    private int mRoamingIndicator = EriInfo.ROAMING_INDICATOR_OFF;
    private boolean mIsInPrl;
    private int mDefaultRoamingIndicator;
    private int mDefaultRoamingIndicator = EriInfo.ROAMING_INDICATOR_OFF;

    /**
     * Initially assume no data connection.
@@ -613,7 +614,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
        int ints[];
        String states[];
        switch (what) {
            case EVENT_POLL_STATE_GPRS: {
            case EVENT_POLL_STATE_GPRS:
                states = (String[])ar.result;
                if (DBG) {
                    log("handlePollStateResultMessage: EVENT_POLL_STATE_GPRS states.length=" +
@@ -646,7 +647,6 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
                            + " dataRadioTechnology=" + dataRadioTechnology);
                }
                break;
            }

            case EVENT_POLL_STATE_REGISTRATION_CDMA: // Handle RIL_REQUEST_REGISTRATION_STATE.
                states = (String[])ar.result;
@@ -661,9 +661,9 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
                int cssIndicator = 0;          //[7] init with 0, because it is treated as a boolean
                int systemId = 0;              //[8] systemId
                int networkId = 0;             //[9] networkId
                int roamingIndicator = -1;     //[10] Roaming indicator
                int roamingIndicator = EriInfo.ROAMING_INDICATOR_OFF;     //[10] Roaming indicator
                int systemIsInPrl = 0;         //[11] Indicates if current system is in PRL
                int defaultRoamingIndicator = 0;  //[12] Is default roaming indicator from PRL
                int defaultRoamingIndicator = EriInfo.ROAMING_INDICATOR_OFF;  //[12] def RI from PRL
                int reasonForDenial = 0;       //[13] Denial reason if registrationState = 3

                if (states.length >= 14) {
@@ -724,6 +724,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
                // list of ERIs for home system, mCdmaRoaming is true.
                mCdmaRoaming =
                        regCodeIsRoaming(registrationState) && !isRoamIndForHomeSystem(states[10]);
                mCdmaRoaming = mCdmaRoaming || mDataRoaming;
                mNewSS.setState (regCodeToServiceState(registrationState));

                mNewSS.setRilVoiceRadioTechnology(radioTechnology);
@@ -1389,7 +1390,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
     * code is registration state 0-5 from TS 27.007 7.2
     * returns true if registered roam, false otherwise
     */
    private boolean
    protected boolean
    regCodeIsRoaming (int code) {
        // 5 is  "in service -- roam"
        return 5 == code;