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

Commit f8a3a6ce authored by Rakesh Pallerla's avatar Rakesh Pallerla Committed by Steve Kondik
Browse files

Make changes to create QtiPhoneProxy class.

Make changes required to create QtiPhoneProxy class.

Change-Id: I1f724bc3c51eaede16185924cae882100ac1642b
parent b71bf216
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ public class PhoneFactory {
                    }
                    Rlog.i(LOG_TAG, "Creating Phone with type = " + phoneType + " sub = " + i);

                    sProxyPhones[i] = new PhoneProxy(phone);
                    sProxyPhones[i] = TelephonyPluginDelegate.getInstance().makePhoneProxy(phone);
                }
                mProxyController = ProxyController.getInstance(context, sProxyPhones,
                        mUiccController, sCommandsInterfaces);
+9 −7
Original line number Diff line number Diff line
@@ -73,16 +73,17 @@ public class PhoneProxy extends Handler implements Phone {

    private int mRilVersion;

    private static final int EVENT_VOICE_RADIO_TECH_CHANGED = 1;
    protected static final int EVENT_VOICE_RADIO_TECH_CHANGED = 1;
    private static final int EVENT_RADIO_ON = 2;
    private static final int EVENT_REQUEST_VOICE_RADIO_TECH_DONE = 3;
    private static final int EVENT_RIL_CONNECTED = 4;
    protected static final int EVENT_REQUEST_VOICE_RADIO_TECH_DONE = 3;
    protected static final int EVENT_RIL_CONNECTED = 4;
    private static final int EVENT_UPDATE_PHONE_OBJECT = 5;
    private static final int EVENT_CARRIER_CONFIG_CHANGED = 6;
    private static final int EVENT_SIM_RECORDS_LOADED = 7;
    private static final int EVENT_RADIO_AVAILABLE = 8;
    protected static final int EVENT_RADIO_UNAVAILABLE = 9;

    private int mPhoneId = 0;
    protected int mPhoneId = 0;

    private Context mContext;
    private BroadcastReceiver mPhoneProxyReceiver = new BroadcastReceiver() {
@@ -111,6 +112,7 @@ public class PhoneProxy extends Handler implements Phone {
        mCommandsInterface.registerForAvailable(this, EVENT_RADIO_AVAILABLE, null);
        mCommandsInterface.registerForVoiceRadioTechChanged(
                             this, EVENT_VOICE_RADIO_TECH_CHANGED, null);
        mCommandsInterface.registerForNotAvailable(this, EVENT_RADIO_UNAVAILABLE, null);
        mPhoneId = phone.getPhoneId();
        mIccSmsInterfaceManager =
                new IccSmsInterfaceManager((PhoneBase)this.mActivePhone);
@@ -220,15 +222,15 @@ public class PhoneProxy extends Handler implements Phone {
        super.handleMessage(msg);
    }

    private static void logd(String msg) {
    protected void logd(String msg) {
        Rlog.d(LOG_TAG, "[PhoneProxy] " + msg);
    }

    private void loge(String msg) {
    protected void loge(String msg) {
        Rlog.e(LOG_TAG, "[PhoneProxy] " + msg);
    }

    private void phoneObjectUpdater(int newVoiceRadioTech) {
    protected void phoneObjectUpdater(int newVoiceRadioTech) {
        logd("phoneObjectUpdater: newVoiceRadioTech=" + newVoiceRadioTech);

        if (mActivePhone != null) {
+5 −0
Original line number Diff line number Diff line
@@ -72,6 +72,11 @@ public abstract class TelephonyPluginBase implements TelephonyPluginInterface {
        return new GSMPhone(context, ci, notifier, phoneId);
    }

    @Override
    public PhoneProxy makePhoneProxy(PhoneBase phone) {
        return new PhoneProxy(phone);
    }

    @Override
    public PhoneBase makeCDMALTEPhone(Context context, CommandsInterface ci,
            PhoneNotifier notifier, int phoneId) {
+4 −0
Original line number Diff line number Diff line
@@ -129,6 +129,10 @@ public class TelephonyPluginDelegate {
        return sPlugin.makeGSMPhone(context, ci, notifier, phoneId);
    }

    public PhoneProxy makePhoneProxy(PhoneBase phone) {
        return sPlugin.makePhoneProxy(phone);
    }

    public PhoneBase makeCDMALTEPhone(Context context, CommandsInterface ci,
            PhoneNotifier notifier, int phoneId) {
        return sPlugin.makeCDMALTEPhone(context, ci, notifier, phoneId);
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ public interface TelephonyPluginInterface {
    public PhoneBase makeGSMPhone(Context context, CommandsInterface ci,
            PhoneNotifier notifier, int phoneId);

    public PhoneProxy makePhoneProxy(PhoneBase phone);

    public PhoneBase makeCDMALTEPhone(Context context, CommandsInterface ci,
            PhoneNotifier notifier, int phoneId);