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

Commit 1ac51f1b authored by Jayachandran C's avatar Jayachandran C
Browse files

Set isGsm flag based on currently camped voice and data RATs

Use currently camped RATs to determine isGsm the flag
instead of checking both phone type and camped RATs.

Test: Verified the signal bar for the following use cases
Idle:
 - SRLTE (1x & LTE) mode
 - hVoLTE mode
 - 2G only, 3G preferred, LTE preferred
 - Cellular and IWLAN registered

Voice calls:
 - CS calls on 1x, GSM, UMTS for all possible voice, data RATs
 - IMS calls on LTE and IWLAN for all possible voice, data RATs

Bug: 36644977
Change-Id: Ifd996a2c902c7238f7328a42f0401c8d626e89e4
parent 87056c26
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -4275,10 +4275,15 @@ public class ServiceStateTracker extends Handler {
     */
    protected boolean onSignalStrengthResult(AsyncResult ar) {
        boolean isGsm = false;
        //override isGsm for CDMA LTE
        if (mPhone.isPhoneTypeGsm() ||
                (mPhone.isPhoneTypeCdmaLte() &&
                        ServiceState.isLte(mSS.getRilDataRadioTechnology()))) {
        int dataRat = mSS.getRilDataRadioTechnology();
        int voiceRat = mSS.getRilVoiceRadioTechnology();

        // Override isGsm based on currently camped data and voice RATs
        // Set isGsm to true if the RAT belongs to GSM family and not IWLAN
        if ((dataRat != ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN
                && ServiceState.isGsm(dataRat))
                || (voiceRat != ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN
                && ServiceState.isGsm(voiceRat))) {
            isGsm = true;
        }