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

Commit bca85064 authored by David Ferguson's avatar David Ferguson
Browse files

Qualcomm LTE RILs: do not make mLteRsrp negative

  * In CM10.1, SignalStrength::validateInput() was added. This function expects
    mLteRsrp to be positive coming from the RIL.
  * Inverting in the RIL was causing validateInput() to flag mLteRsrp as invalid.
  * This shows up as a 0x7fffffff in About phone->Status->Signal strength when on LTE
  * Let validateInput() invert the sign instead of doing it in the custom RILs

Change-Id: I6ae7e4a56141c49628576305d21bee77b2a93ad7
parent 785f7a25
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -179,9 +179,6 @@ public class LGEQualcommUiccRIL extends QualcommSharedRIL implements CommandsInt
                response[i] = -1;
                noLte = true;
            }
            if (i == 8 && !(noLte || oldRil)) {
                response[i] *= -1;
            }
        }

        return new SignalStrength(response[0], response[1], response[2], response[3], response[4], response[5], response[6], response[7],response[8], response[9], response[10], response[11], true);
+0 −3
Original line number Diff line number Diff line
@@ -366,9 +366,6 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                response[i] = -1;
                noLte = true;
            }
            if (i == 8 && !(noLte || oldRil)) {
                response[i] *= -1;
            }
        }
        return new SignalStrength(response[0], response[1], response[2], response[3], response[4], response[5], response[6], response[7],response[8], response[9], response[10], response[11], true);
    }
+7 −8
Original line number Diff line number Diff line
@@ -293,17 +293,16 @@ public class SamsungQualcommUiccRIL extends QualcommSharedRIL implements Command

            // Translate number of bars into something SignalStrength.java can understand
            switch (num_bars) {
                case 0  : response[8] = -1;   break; // map to 0 bars
                case 1  : response[8] = -116; break; // map to 1 bar
                case 2  : response[8] = -115; break; // map to 2 bars
                case 3  : response[8] = -105; break; // map to 3 bars
                case 4  : response[8] = -95;  break; // map to 4 bars
                case 5  : response[8] = -85;  break; // map to 4 bars but give an extra 10 dBm
                default : response[8] *= -1;  break; // no idea; just pass value through
                case 0  : response[8] = 1;   break; // map to 0 bars
                case 1  : response[8] = 116; break; // map to 1 bar
                case 2  : response[8] = 115; break; // map to 2 bars
                case 3  : response[8] = 105; break; // map to 3 bars
                case 4  : response[8] = 95;  break; // map to 4 bars
                case 5  : response[8] = 85;  break; // map to 4 bars but give an extra 10 dBm
                default :                    break; // no idea; just pass value through
            }
        } else {
            response[7] &= 0xff;  // remove the Samsung number of bars field
            response[8] *= -1;
        }

        Log.d(LOG_TAG, "responseSignalStength AFTER: mode=" + (mSignalbarCount ? "bars" : "raw") +