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

Commit 7fc2bb7f authored by Koushik Dutta's avatar Koushik Dutta Committed by Gerrit Code Review
Browse files

Merge "fix signal strength display on CDMA SGS devices (fascinatemtd/etc) this...

Merge "fix signal strength display on CDMA SGS devices (fascinatemtd/etc) this fix was removed in 2.3.5 merge - http://bit.ly/qweyWQ" into gingerbread
parents 76d0edfe 8814c57e
Loading
Loading
Loading
Loading
+20 −8
Original line number Original line Diff line number Diff line
@@ -1153,6 +1153,17 @@ public class StatusBarPolicy {
            // If 3G(EV) and 1x network are available than 3G should be
            // If 3G(EV) and 1x network are available than 3G should be
            // displayed, displayed RSSI should be from the EV side.
            // displayed, displayed RSSI should be from the EV side.
            // If a voice call is made then RSSI should switch to 1x.
            // 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()
                if ((mPhoneState == TelephonyManager.CALL_STATE_IDLE) && isEvdo()
                    && !mAlwaysUseCdmaRssi) {
                    && !mAlwaysUseCdmaRssi) {
                    iconLevel = getEvdoLevel();
                    iconLevel = getEvdoLevel();
@@ -1170,6 +1181,7 @@ public class StatusBarPolicy {
                    }
                    }
                }
                }
            }
            }
        }
        mPhoneSignalIconId = iconList[iconLevel];
        mPhoneSignalIconId = iconList[iconLevel];
        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
        mService.setIcon("phone_signal", mPhoneSignalIconId, 0);
    }
    }