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

Commit 7fa886db authored by Nathan Harold's avatar Nathan Harold
Browse files

Update SignalStrength to use ASU for TD-SDCMA

The HAL for Radio 1.2 uses -TD-SDCMA rather than
ASU RSCP for the signal strength for TD-SCDMA. This
change updates the HAL to use the new ASU-range
input.

Bug: 74202653
Test: runtest frameworks-telephony
Change-Id: Iab37ca19daf12179933cef580f248c3ef8258b98
Merged-In: Iab37ca19daf12179933cef580f248c3ef8258b98
(cherry picked from commit 31135514)
parent d41feee9
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -87,7 +87,7 @@ public class SignalStrength implements Parcelable {
    private int mLteRsrq;
    private int mLteRsrq;
    private int mLteRssnr;
    private int mLteRssnr;
    private int mLteCqi;
    private int mLteCqi;
    private int mTdScdmaRscp;
    private int mTdScdmaRscp; // Valid values are -24...-120dBm or INVALID if unknown
    private int mWcdmaSignalStrength;
    private int mWcdmaSignalStrength;
    private int mWcdmaRscpAsu;  // the WCDMA RSCP in ASU as reported from the HAL
    private int mWcdmaRscpAsu;  // the WCDMA RSCP in ASU as reported from the HAL
    private int mWcdmaRscp;     // the WCDMA RSCP in dBm
    private int mWcdmaRscp;     // the WCDMA RSCP in dBm
@@ -401,8 +401,8 @@ public class SignalStrength implements Parcelable {
        mLteRssnr = ((mLteRssnr >= -200) && (mLteRssnr <= 300)) ? mLteRssnr
        mLteRssnr = ((mLteRssnr >= -200) && (mLteRssnr <= 300)) ? mLteRssnr
                : SignalStrength.INVALID;
                : SignalStrength.INVALID;


        mTdScdmaRscp = ((mTdScdmaRscp >= 25) && (mTdScdmaRscp <= 120))
        mTdScdmaRscp = ((mTdScdmaRscp >= 0) && (mTdScdmaRscp <= 96))
                ? -mTdScdmaRscp : SignalStrength.INVALID;
                ? (mTdScdmaRscp - 120) : SignalStrength.INVALID;
        // Cqi no change
        // Cqi no change
        if (DBG) log("Signal after validate=" + this);
        if (DBG) log("Signal after validate=" + this);
    }
    }