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

Commit d9aa1a75 authored by Andrew Lee's avatar Andrew Lee
Browse files

Pass Message to sendDtmf, notify postNotify.

+ Use ImsPhoneCallTracker's sendDtmf method instead of the commands
interface.
+ Echo GsmConnection/CdmaConnection in notifying post dial listeners
after the post dial state is updated. Otherwise, the post dial dialog
is not shown.

Bug: 18643493
Change-Id: I9db13a673bd022bf3949a268f5f54f2c8f2511fc
parent 8b25624b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -515,7 +515,7 @@ public class ImsPhone extends ImsPhoneBase {
                    "sendDtmf called with invalid character '" + c + "'");
        } else {
            if (mCT.mState ==  PhoneConstants.State.OFFHOOK) {
                mCT.sendDtmf(c);
                mCT.sendDtmf(c, null);
            }
        }
    }
+4 −7
Original line number Diff line number Diff line
@@ -666,24 +666,21 @@ public final class ImsPhoneCallTracker extends CallTracker {
        }
    }

    /*package*/ void
    setMute(boolean mute) {
    /*package*/ void setMute(boolean mute) {
        mDesiredMute = mute;
        mForegroundCall.setMute(mute);
    }

    /*package*/ boolean
    getMute() {
    /*package*/ boolean getMute() {
        return mDesiredMute;
    }

    /*package*/ void
    sendDtmf(char c) {
    /* package */ void sendDtmf(char c, Message result) {
        if (DBG) log("sendDtmf");

        ImsCall imscall = mForegroundCall.getImsCall();
        if (imscall != null) {
            imscall.sendDtmf(c);
            imscall.sendDtmf(c, result);
        }
    }

+3 −3
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ public class ImsPhoneConnection extends Connection {
    private boolean
    processPostDialChar(char c) {
        if (PhoneNumberUtils.is12Key(c)) {
            mOwner.mCi.sendDtmf(c, mHandler.obtainMessage(EVENT_DTMF_DONE));
            mOwner.sendDtmf(c, mHandler.obtainMessage(EVENT_DTMF_DONE));
        } else if (c == PhoneNumberUtils.PAUSE) {
            // From TS 22.101:
            // It continues...
@@ -423,8 +423,7 @@ public class ImsPhoneConnection extends Connection {
            return;
        }

        if (mPostDialString == null ||
                mPostDialString.length() <= mNextPostDialChar) {
        if (mPostDialString == null || mPostDialString.length() <= mNextPostDialChar) {
            setPostDialState(PostDialState.COMPLETE);

            // notifyMessage.arg1 is 0 on complete
@@ -485,6 +484,7 @@ public class ImsPhoneConnection extends Connection {
            releaseWakeLock();
        }
        mPostDialState = s;
        notifyPostDialListeners();
    }

    private void