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

Commit defabee8 authored by Chris123NT's avatar Chris123NT
Browse files

Revert "Revert "Fix for data and roaming icons""

This reverts commit cc91bddc.

This is breaking 1x data on d2vzw and jfltevzw.

Change-Id: I6a0db457b5655d7065b68f403394b3c3feffa05f
parent e56ba000
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -203,6 +203,9 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
                        + " regState=" + regState
                        + " dataRadioTechnology=" + type);
            }
            mDataRoaming = regCodeIsRoaming(regState);

            if (mDataRoaming) mNewSS.setRoaming(true);
        } else {
            super.handlePollStateResultMessage(what, ar);
        }
@@ -375,7 +378,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 {
                    // Note that ServiceState.STATE_OUT_OF_SERVICE is valid used
+8 −7
Original line number Diff line number Diff line
@@ -96,9 +96,10 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
            "ro.cdma.subscribe_on_ruim_ready", false);

    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.
@@ -569,7 +570,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=" +
@@ -602,7 +603,6 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
                            + " dataRadioTechnology=" + dataRadioTechnology);
                }
                break;
            }

            case EVENT_POLL_STATE_REGISTRATION_CDMA: // Handle RIL_REQUEST_REGISTRATION_STATE.
                states = (String[])ar.result;
@@ -617,9 +617,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) {
@@ -680,6 +680,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);
@@ -1233,7 +1234,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;