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

Commit bfccc4c9 authored by Yashdev Singh's avatar Yashdev Singh Committed by Linux Build Service Account
Browse files

Telephony: Keep RADIO state off in APM for iwlan RAT.

- Due to polling in APM the current service state gets changed
from OFF to OOS which is incorrect.
- Let the radio state be in OFF state and added additional checks
to allow non-default PDP activation if current RAT is iwlan.

Change-Id: I3f62b225fa2345a278858560a44ccd6ab1a9e32a
parent 03affabc
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -344,8 +344,21 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
        boolean hasLocationChanged = !mNewCellLoc.equals(mCellLoc);

        if (mCi.getRadioState() == CommandsInterface.RadioState.RADIO_OFF) {
            boolean resetIwlanRatVal = false;
            log("set service state as POWER_OFF");
            if (isIwlanFeatureAvailable()
                    && (ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN
                        == mNewSS.getRilDataRadioTechnology())) {
                log("pollStateDone: mNewSS = " + mNewSS);
                log("pollStateDone: reset iwlan RAT value");
                resetIwlanRatVal = true;
            }
            mNewSS.setStateOff();
            if (resetIwlanRatVal) {
                mNewSS.setRilDataRadioTechnology(ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN);
                log("pollStateDone: mNewSS = " + mNewSS);
                resetIwlanRatVal = false;
            }
        }

        boolean has4gHandoff =
+13 −0
Original line number Diff line number Diff line
@@ -1077,8 +1077,21 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
        boolean hasLocationChanged = !mNewCellLoc.equals(mCellLoc);

        if (mCi.getRadioState() == CommandsInterface.RadioState.RADIO_OFF) {
            boolean resetIwlanRatVal = false;
            log("set service state as POWER_OFF");
            if (isIwlanFeatureAvailable()
                    && (ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN
                        == mNewSS.getRilDataRadioTechnology())) {
                log("pollStateDone: mNewSS = " + mNewSS);
                log("pollStateDone: reset iwlan RAT value");
                resetIwlanRatVal = true;
            }
            mNewSS.setStateOff();
            if (resetIwlanRatVal) {
                mNewSS.setRilDataRadioTechnology(ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN);
                log("pollStateDone: mNewSS = " + mNewSS);
                resetIwlanRatVal = false;
            }
        }

        // Add an event log when connection state changes
+1 −0
Original line number Diff line number Diff line
@@ -1104,6 +1104,7 @@ public final class DcTracker extends DcTrackerBase {
        if (radioTech == ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN
                && desiredPowerState == false) {
            desiredPowerState = true;
            attachedState = true;
        }

        IccRecords r = mIccRecords.get();
+13 −0
Original line number Diff line number Diff line
@@ -988,8 +988,21 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
        boolean needNotifyData = (mSS.getCssIndicator() != mNewSS.getCssIndicator());

        if (mCi.getRadioState() == CommandsInterface.RadioState.RADIO_OFF) {
            boolean resetIwlanRatVal = false;
            log("set service state as POWER_OFF");
            if (isIwlanFeatureAvailable()
                    && (ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN
                        == mNewSS.getRilDataRadioTechnology())) {
                log("pollStateDone: mNewSS = " + mNewSS);
                log("pollStateDone: reset iwlan RAT value");
                resetIwlanRatVal = true;
            }
            mNewSS.setStateOff();
            if (resetIwlanRatVal) {
                mNewSS.setRilDataRadioTechnology(ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN);
                log("pollStateDone: mNewSS = " + mNewSS);
                resetIwlanRatVal = false;
            }
        }

        // Add an event log when connection state changes