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

Commit fdddaed0 authored by Shareef Ali's avatar Shareef Ali
Browse files

SamsungQualcommRIL: fix race condition when starting phone type.

* ril is init but hasn't picked cdma or gsm, instead the ril picks no-phone.
* support switching gsm to cdma and vica versa
Change-Id: Ib9eaf88d5a7e90b2458ab787da230fca9a41249f
parent cbe7c3f2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -194,6 +194,12 @@ public class SamsungQualcommRIL extends RIL implements CommandsInterface {

    }

    @Override
    public void setPhoneType(int phoneType){
        super.setPhoneType(phoneType);
        isGSM = (phoneType != RILConstants.CDMA_PHONE);
        samsungDriverCall = (needsOldRilFeature("newDriverCall") && !isGSM) || mRilVersion < 7 ? false : true;
    }

    @Override
    protected void
@@ -210,8 +216,6 @@ public class SamsungQualcommRIL extends RIL implements CommandsInterface {
                setRadioPower(false, null);
                setPreferredNetworkType(mPreferredNetworkType, null);
                notifyRegistrantsRilConnectionChanged(((int[])ret)[0]);
                isGSM = (mPhoneType != RILConstants.CDMA_PHONE);
                samsungDriverCall = (needsOldRilFeature("newDriverCall") && !isGSM) || mRilVersion < 7 ? false : true;
                break;
            case RIL_UNSOL_NITZ_TIME_RECEIVED:
                handleNitzTimeReceived(p);