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

Commit 98a7c454 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I66ff8af6 into eclair-mr2

* changes:
  Move calc of EriIconIndex/Mode to whenever basis changes
parents a86f1ccc cc5c1ad5
Loading
Loading
Loading
Loading
+2 −16
Original line number Diff line number Diff line
@@ -257,12 +257,6 @@ public class CDMAPhone extends PhoneBase {
    }

    public ServiceState getServiceState() {
        int roamInd = mSST.ss.getCdmaRoamingIndicator();
        int defRoamInd = mSST.ss.getCdmaDefaultRoamingIndicator();

        mSST.ss.setCdmaEriIconIndex(mEriManager.getCdmaEriIconIndex(roamInd, defRoamInd));
        mSST.ss.setCdmaEriIconMode(mEriManager.getCdmaEriIconMode(roamInd, defRoamInd));

        return mSST.ss;
    }

@@ -804,10 +798,6 @@ public class CDMAPhone extends PhoneBase {
    }

     void notifyServiceStateChanged(ServiceState ss) {
         // TODO this seems really inefficient.  Can't we calc this when the fundamentals change and store in the
         // service state?
         ss.setCdmaEriIconIndex(this.getCdmaEriIconIndex());
         ss.setCdmaEriIconMode(this.getCdmaEriIconMode());
         super.notifyServiceStateChangedP(ss);
     }

@@ -1330,9 +1320,7 @@ public class CDMAPhone extends PhoneBase {

    @Override
    public int getCdmaEriIconIndex() {
        int roamInd = getServiceState().getCdmaRoamingIndicator();
        int defRoamInd = getServiceState().getCdmaDefaultRoamingIndicator();
        return mEriManager.getCdmaEriIconIndex(roamInd, defRoamInd);
        return getServiceState().getCdmaEriIconIndex();
    }

    /**
@@ -1342,9 +1330,7 @@ public class CDMAPhone extends PhoneBase {
     */
    @Override
    public int getCdmaEriIconMode() {
        int roamInd = getServiceState().getCdmaRoamingIndicator();
        int defRoamInd = getServiceState().getCdmaDefaultRoamingIndicator();
        return mEriManager.getCdmaEriIconMode(roamInd, defRoamInd);
        return getServiceState().getCdmaEriIconMode();
    }

    /**
+6 −0
Original line number Diff line number Diff line
@@ -782,6 +782,12 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
                }
            }

            int roamingIndicator = newSS.getCdmaRoamingIndicator();
            newSS.setCdmaEriIconIndex(phone.mEriManager.getCdmaEriIconIndex(roamingIndicator,
                    mDefaultRoamingIndicator));
            newSS.setCdmaEriIconMode(phone.mEriManager.getCdmaEriIconMode(roamingIndicator,
                    mDefaultRoamingIndicator));

            // NOTE: Some operator may require overriding mCdmaRoaming
            // (set by the modem), depending on the mRoamingIndicator.