summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-01-25 11:51:46 -0800
committerEric Laurent <elaurent@google.com>2011-02-01 15:25:41 -0800
commit3d4069a2e0c1c23244ead88a177ec06a2ef7a7d1 (patch)
treeb4a18defcd54763c924b92c2389bf1c26d6ce812 /telephony/java
parentcbf0983ec97879026e87fa97ff0b5c8786bfc8f8 (diff)
downloadframeworks_base-3d4069a2e0c1c23244ead88a177ec06a2ef7a7d1.zip
frameworks_base-3d4069a2e0c1c23244ead88a177ec06a2ef7a7d1.tar.gz
frameworks_base-3d4069a2e0c1c23244ead88a177ec06a2ef7a7d1.tar.bz2
Allow TTY mode for GSM Phones
TTY mode should not be restricted to CDMA phones as some GSM carriers support it. TTY support is enabled by overlaying the tty_enabled boolean property in packages/apps/Phones/res/values/config.xml Also corrected wrong comments on TTY methods. Change-Id: I48dbc2be51c3dcdaedc1838b85134edc7012be3c
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/com/android/internal/telephony/CommandsInterface.java17
-rw-r--r--telephony/java/com/android/internal/telephony/Phone.java8
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneBase.java6
-rwxr-xr-xtelephony/java/com/android/internal/telephony/cdma/CDMAPhone.java14
-rw-r--r--telephony/java/com/android/internal/telephony/test/SimulatedCommands.java21
5 files changed, 32 insertions, 34 deletions
diff --git a/telephony/java/com/android/internal/telephony/CommandsInterface.java b/telephony/java/com/android/internal/telephony/CommandsInterface.java
index 8e03c5a..d84f396 100644
--- a/telephony/java/com/android/internal/telephony/CommandsInterface.java
+++ b/telephony/java/com/android/internal/telephony/CommandsInterface.java
@@ -1305,18 +1305,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);
diff --git a/telephony/java/com/android/internal/telephony/Phone.java b/telephony/java/com/android/internal/telephony/Phone.java
index d5791eb..c7d4ead 100644
--- a/telephony/java/com/android/internal/telephony/Phone.java
+++ b/telephony/java/com/android/internal/telephony/Phone.java
@@ -1463,9 +1463,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);
diff --git a/telephony/java/com/android/internal/telephony/PhoneBase.java b/telephony/java/com/android/internal/telephony/PhoneBase.java
index 53503a5..9c6b432 100644
--- a/telephony/java/com/android/internal/telephony/PhoneBase.java
+++ b/telephony/java/com/android/internal/telephony/PhoneBase.java
@@ -697,13 +697,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) {
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index f48c956..249b050 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -1143,20 +1143,6 @@ public class CDMAPhone extends PhoneBase {
}
/**
- * 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.
*
* @param activate 0 = activate, 1 = deactivate
diff --git a/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java b/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java
index 9c72e5a..beec177 100644
--- a/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java
+++ b/telephony/java/com/android/internal/telephony/test/SimulatedCommands.java
@@ -1402,23 +1402,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) {