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

Commit 6f2c1c92 authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am 0990484c: am 3d4069a2: Allow TTY mode for GSM Phones

* commit '0990484c':
  Allow TTY mode for GSM Phones
parents f93d9c57 0990484c
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -1289,18 +1289,25 @@ public interface CommandsInterface {
    void setCdmaSubscription(int cdmaSubscriptionType, Message response);

    /**
     *  Set the TTY mode for the CDMA phone
     *  Set the TTY mode
     *
     * @param enable is true to enable, false to disable
     * @param ttyMode one of the following:
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
     * @param response is callback message
     */
    void setTTYMode(int ttyMode, Message response);

    /**
     *  Query the TTY mode for the CDMA phone
     *  Query the TTY mode
     * (AsyncResult)response.obj).result is an int[] with element [0] set to
     * 0 for disabled, 1 for enabled.
     *
     * tty mode:
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
     * @param response is callback message
     */
    void queryTTYMode(Message response);
+5 −3
Original line number Diff line number Diff line
@@ -1430,9 +1430,11 @@ public interface Phone {
    /**
     * setTTYMode
     * sets a TTY mode option.
     *
     * @param ttyMode is a boolean representing the state that you are
     *        requesting, true for enabled, false for disabled.
     * @param ttyMode is a one of the following:
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
     * @param onComplete a callback message when the action is completed
     */
    void setTTYMode(int ttyMode, Message onComplete);
+2 −4
Original line number Diff line number Diff line
@@ -702,13 +702,11 @@ public abstract class PhoneBase extends Handler implements Phone {
    }

    public void setTTYMode(int ttyMode, Message onComplete) {
        // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
        logUnexpectedCdmaMethodCall("setTTYMode");
        mCM.setTTYMode(ttyMode, onComplete);
    }

    public void queryTTYMode(Message onComplete) {
        // This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
        logUnexpectedCdmaMethodCall("queryTTYMode");
        mCM.queryTTYMode(onComplete);
    }

    public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete) {
+0 −14
Original line number Diff line number Diff line
@@ -1102,20 +1102,6 @@ public class CDMAPhone extends PhoneBase {
        return this.mIccFileHandler;
    }

    /**
     * Set the TTY mode of the CDMAPhone
     */
    public void setTTYMode(int ttyMode, Message onComplete) {
        this.mCM.setTTYMode(ttyMode, onComplete);
    }

    /**
     * Queries the TTY mode of the CDMAPhone
     */
    public void queryTTYMode(Message onComplete) {
        this.mCM.queryTTYMode(onComplete);
    }

    /**
     * Activate or deactivate cell broadcast SMS.
     *
+13 −8
Original line number Diff line number Diff line
@@ -1392,23 +1392,28 @@ public final class SimulatedCommands extends BaseCommands
    }

    /**
     *  Set the TTY mode for the CDMA phone
     *  Set the TTY mode
     *
     * @param enable is true to enable, false to disable
     * @param serviceClass is a sum of SERVICE_CLASS_*
     * @param ttyMode is one of the following:
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
     * @param response is callback message
     */
    public void setTTYMode(int ttyMode, Message response) {
        Log.w(LOG_TAG, "CDMA not implemented in SimulatedCommands");
        Log.w(LOG_TAG, "Not implemented in SimulatedCommands");
        unimplemented(response);
    }

    /**
     *  Query the TTY mode for the CDMA phone
     *  Query the TTY mode
     * (AsyncResult)response.obj).result is an int[] with element [0] set to
     * 0 for disabled, 1 for enabled.
     *
     * @param serviceClass is a sum of SERVICE_CLASS_*
     * tty mode:
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
     * @param response is callback message
     */
    public void queryTTYMode(Message response) {