summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/test-current.txt1
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java21
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl2
3 files changed, 24 insertions, 0 deletions
diff --git a/api/test-current.txt b/api/test-current.txt
index 3f26ab094ce9..b59eaccf7823 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -1207,6 +1207,7 @@ package android.telephony {
public class TelephonyManager {
method public int getCarrierIdListVersion();
+ method public boolean isRttSupported();
method public void refreshUiccProfile();
method public void setCarrierTestOverride(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
field public static final int UNKNOWN_CARRIER_ID_LIST_VERSION = -1; // 0xffffffff
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 90d27c8d76a9..e5c4ccda422a 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -7445,6 +7445,27 @@ public class TelephonyManager {
}
/**
+ * Determines whether the device currently supports RTT (Real-time text). Based both on carrier
+ * support for the feature and device firmware support.
+ *
+ * @return {@code true} if the device and carrier both support RTT, {@code false} otherwise.
+ * @hide
+ */
+ @TestApi
+ public boolean isRttSupported() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.isRttSupported(mSubId);
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isRttSupported", e);
+ } catch (SecurityException e) {
+ Log.e(TAG, "Permission error calling ITelephony#isWorldPhone", e);
+ }
+ return false;
+ }
+ /**
* Whether the phone supports hearing aid compatibility.
*
* @return {@code true} if the device supports hearing aid compatibility, and {@code false}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 3938535c2141..b20b164e46d5 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1054,6 +1054,8 @@ interface ITelephony {
*/
boolean isTtyModeSupported();
+ boolean isRttSupported(int subscriptionId);
+
/**
* Whether the phone supports hearing aid compatibility.
*