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

Commit df81b1b8 authored by Hall Liu's avatar Hall Liu Committed by Gerrit Code Review
Browse files

Merge "Pin IMS on/off to actual TTY mode"

parents 98c0c5cc 586b3105
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1850,6 +1850,13 @@ public class GsmCdmaPhone extends Phone {
        }
    }

    @Override
    public void setTTYMode(int ttyMode, Message onComplete) {
        if (mImsPhone != null) {
            mImsPhone.setTTYMode(ttyMode, onComplete);
        }
    }

    @Override
    public void setUiTTYMode(int uiTtyMode, Message onComplete) {
       if (mImsPhone != null) {
+6 −0
Original line number Diff line number Diff line
@@ -703,6 +703,12 @@ public class ImsPhone extends ImsPhoneBase {
        mCT.setMute(muted);
    }

    @Override
    public void setTTYMode(int ttyMode, Message onComplete) {
        super.setTTYMode(ttyMode, onComplete);
        mCT.setTtyMode(ttyMode);
    }

    @Override
    public void setUiTTYMode(int uiTtyMode, Message onComplete) {
        mCT.setUiTTYMode(uiTtyMode, onComplete);
+21 −1
Original line number Diff line number Diff line
@@ -1382,7 +1382,27 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
    }

    //***** Called from ImsPhone
    /**
     * Set the TTY mode. This is the actual tty mode (varies depending on peripheral status)
     */
    public void setTtyMode(int ttyMode) {
        if (mImsManager == null) {
            Log.w(LOG_TAG, "ImsManager is null when setting TTY mode");
            return;
        }

        try {
            mImsManager.setTtyMode(ttyMode);
        } catch (ImsException e) {
            loge("setTtyMode : " + e);
            retryGetImsService();
        }
    }

    /**
     * Sets the UI TTY mode. This is the preferred TTY mode that the user sets in the call
     * settings screen.
     */
    public void setUiTTYMode(int uiTtyMode, Message onComplete) {
        if (mImsManager == null) {
            mPhone.sendErrorResponse(onComplete, getImsManagerIsNullException());
@@ -1392,7 +1412,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        try {
            mImsManager.setUiTTYMode(mPhone.getContext(), uiTtyMode, onComplete);
        } catch (ImsException e) {
            loge("setTTYMode : " + e);
            loge("setUITTYMode : " + e);
            mPhone.sendErrorResponse(onComplete, e);
            retryGetImsService();
        }