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

Commit c533f98d authored by sqian's avatar sqian Committed by android-build-merger
Browse files

Use CallTracker instead of mParent to get Phone in Connection for emergency calling flow.

am: dbf9123d

Change-Id: Ied6be3a14dce733747f1acb4c4b774edd988816e
parents 6369bf63 dbf9123d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -101,6 +101,8 @@ public abstract class CallTracker extends Handler {


    protected abstract void handlePollCalls(AsyncResult ar);
    protected abstract void handlePollCalls(AsyncResult ar);


    protected abstract Phone getPhone();

    protected Connection getHoConnection(DriverCall dc) {
    protected Connection getHoConnection(DriverCall dc) {
        for (Connection hoConn : mHandoverConnections) {
        for (Connection hoConn : mHandoverConnections) {
            log("getHoConnection - compare number: hoConn= " + hoConn.toString());
            log("getHoConnection - compare number: hoConn= " + hoConn.toString());
+11 −4
Original line number Original line Diff line number Diff line
@@ -506,10 +506,9 @@ public abstract class Connection {
     *
     *
     * @hide
     * @hide
     */
     */
    public void setEmergencyCallInfo() {
    public void setEmergencyCallInfo(CallTracker ct) {
        Call call = getCall();
        if (ct != null) {
        if (call != null) {
            Phone phone = ct.getPhone();
            Phone phone = call.getPhone();
            if (phone != null) {
            if (phone != null) {
                EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
                EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
                if (tracker != null) {
                if (tracker != null) {
@@ -517,9 +516,17 @@ public abstract class Connection {
                    if (num != null) {
                    if (num != null) {
                        mIsEmergencyCall = true;
                        mIsEmergencyCall = true;
                        mEmergencyNumberInfo = num;
                        mEmergencyNumberInfo = num;
                    } else {
                        Rlog.e(TAG, "setEmergencyCallInfo: emergency number is null");
                    }
                    }
                } else {
                    Rlog.e(TAG, "setEmergencyCallInfo: emergency number tracker is null");
                }
                }
            } else {
                Rlog.e(TAG, "setEmergencyCallInfo: phone is null");
            }
            }
        } else {
            Rlog.e(TAG, "setEmergencyCallInfo: call tracker is null");
        }
        }
    }
    }


+1 −0
Original line number Original line Diff line number Diff line
@@ -1748,6 +1748,7 @@ public class GsmCdmaCallTracker extends CallTracker {
    }
    }


    @UnsupportedAppUsage
    @UnsupportedAppUsage
    @Override
    public GsmCdmaPhone getPhone() {
    public GsmCdmaPhone getPhone() {
        return mPhone;
        return mPhone;
    }
    }
+2 −2
Original line number Original line Diff line number Diff line
@@ -136,7 +136,7 @@ public class GsmCdmaConnection extends Connection {
        mHandler = new MyHandler(mOwner.getLooper());
        mHandler = new MyHandler(mOwner.getLooper());


        mAddress = dc.number;
        mAddress = dc.number;
        setEmergencyCallInfo();
        setEmergencyCallInfo(mOwner);


        mIsIncoming = dc.isMT;
        mIsIncoming = dc.isMT;
        mCreateTime = System.currentTimeMillis();
        mCreateTime = System.currentTimeMillis();
@@ -179,7 +179,7 @@ public class GsmCdmaConnection extends Connection {


        mAddress = PhoneNumberUtils.extractNetworkPortionAlt(dialString);
        mAddress = PhoneNumberUtils.extractNetworkPortionAlt(dialString);
        if (isEmergencyCall) {
        if (isEmergencyCall) {
            setEmergencyCallInfo();
            setEmergencyCallInfo(mOwner);
        }
        }


        mPostDialString = PhoneNumberUtils.extractPostDialPortion(dialString);
        mPostDialString = PhoneNumberUtils.extractPostDialPortion(dialString);
+1 −0
Original line number Original line Diff line number Diff line
@@ -4218,6 +4218,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        return countryIso;
        return countryIso;
    }
    }


    @Override
    public ImsPhone getPhone() {
    public ImsPhone getPhone() {
        return mPhone;
        return mPhone;
    }
    }
Loading