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

Commit 8800166c authored by Preeti Ahuja's avatar Preeti Ahuja Committed by Gerrit - the friendly Code Review server
Browse files

Query voice radio tech once the radio is available.

Currently, Telephony sends a request for voice radio tech once the
radio moves to 'ON' state. In addition to this, query the voice radio
tech once the radio is available.

Change-Id: I4f575a9954fdc30201b6fa50762269b25d0dbcbc
CRs-Fixed: 913957
parent 834fa99c
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);
    }