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

Commit a57d02ec authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Query voice radio tech once the radio is available."

parents e434b422 8800166c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ public class PhoneProxy extends Handler implements Phone {
    private static final int EVENT_RIL_CONNECTED = 4;
    private static final int EVENT_UPDATE_PHONE_OBJECT = 5;
    private static final int EVENT_SIM_RECORDS_LOADED = 6;
    private static final int EVENT_RADIO_AVAILABLE = 7;

    private int mPhoneId = 0;

@@ -93,6 +94,7 @@ public class PhoneProxy extends Handler implements Phone {

        mCommandsInterface.registerForRilConnected(this, EVENT_RIL_CONNECTED, null);
        mCommandsInterface.registerForOn(this, EVENT_RADIO_ON, null);
        mCommandsInterface.registerForAvailable(this, EVENT_RADIO_AVAILABLE, null);
        mCommandsInterface.registerForVoiceRadioTechChanged(
                             this, EVENT_VOICE_RADIO_TECH_CHANGED, null);
        mPhoneId = phone.getPhoneId();
@@ -112,6 +114,8 @@ public class PhoneProxy extends Handler implements Phone {
    public void handleMessage(Message msg) {
        AsyncResult ar = (AsyncResult) msg.obj;
        switch(msg.what) {
        case EVENT_RADIO_AVAILABLE:
            // intentional fall through.
        case EVENT_RADIO_ON:
            /* Proactively query voice radio technologies */
            mCommandsInterface.getVoiceRadioTechnology(
@@ -1366,6 +1370,7 @@ public class PhoneProxy extends Handler implements Phone {
            mActivePhone.unregisterForSimRecordsLoaded(this);
        }
        mCommandsInterface.unregisterForOn(this);
        mCommandsInterface.unregisterForAvailable(this);
        mCommandsInterface.unregisterForVoiceRadioTechChanged(this);
        mCommandsInterface.unregisterForRilConnected(this);
    }