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

Commit 8814c57e authored by jt1134's avatar jt1134
Browse files

fix signal strength display on CDMA SGS devices (fascinatemtd/etc)

this fix was removed in 2.3.5 merge - http://bit.ly/qweyWQ

Change-Id: I8d083b7254edc20895311a8150d7d9c70ef6c959
parent 6be8ff02
Loading
Loading
Loading
Loading
+20 −8
Original line number Diff line number Diff line
@@ -1153,6 +1153,17 @@ public class StatusBarPolicy {
            // If 3G(EV) and 1x network are available than 3G should be
            // displayed, displayed RSSI should be from the EV side.
            // If a voice call is made then RSSI should switch to 1x.

            // Samsung CDMA devices handle signal strength display differently
            // relying only on cdmaDbm - thanks Adr0it for the assistance here
            if (SystemProperties.get("ro.ril.samsung_cdma").equals("true")) {
                final int cdmaDbm = mSignalStrength.getCdmaDbm();
                if (cdmaDbm >= -75) iconLevel = 4;
                else if (cdmaDbm >= -85) iconLevel = 3;
                else if (cdmaDbm >= -95) iconLevel = 2;
                else if (cdmaDbm >= -100) iconLevel = 1;
                else iconLevel = 0;
            } else {
                if ((mPhoneState == TelephonyManager.CALL_STATE_IDLE) && isEvdo()
                    && !mAlwaysUseCdmaRssi) {
                    iconLevel = getEvdoLevel();
@@ -1170,6 +1181,7 @@ public class StatusBarPolicy {
                    }
                }
            }
        }
        mPhoneSignalIconId = iconList[iconLevel];
        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
    }