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

Commit fdd6fb42 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Add a public method to access the Radio state

In order to be sure that the Radio is available to communicate, we now
check to see if the radio is available for commands. We are going to use
this in emergency calling to make sure that the Radio is on (and not
still in the unavailable state) after disabling airplane mode.

Bug: 29039211
Change-Id: I3ee828e165f8e9501de4650c06172ad33c93d51f
parent d21e179e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2418,6 +2418,10 @@ public class ServiceStateTracker extends Handler {
        }
    }

    public boolean isRadioOn() {
        return mCi.getRadioState() == CommandsInterface.RadioState.RADIO_ON;
    }

    /**
     * A complete "service state" from our perspective is
     * composed of a handful of separate requests to the radio.