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

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

Merge "Make changes to create QtiPhoneProxy class."

parents f28173e0 d0de25bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,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
@@ -72,15 +72,16 @@ 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_SIM_RECORDS_LOADED = 6;
    private static final int EVENT_RADIO_AVAILABLE = 7;
    protected static final int EVENT_RADIO_UNAVAILABLE = 8;

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

    private static final String LOG_TAG = "PhoneProxy";

@@ -99,6 +100,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);
@@ -187,15 +189,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
@@ -71,6 +71,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
@@ -120,6 +120,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
@@ -49,6 +49,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);