summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/InCallAdapter.java
diff options
context:
space:
mode:
authorHall Liu <hallliu@google.com>2017-01-25 17:12:49 -0800
committerHall Liu <hallliu@google.com>2017-02-21 15:27:25 -0800
commit95d5587d0aad9dfd49f798408f4212f95ce68fc7 (patch)
tree3ab3c4797dfb6ba2d7e7c40c2f5da8a5701cdb52 /telecomm/java/android/telecom/InCallAdapter.java
parent975be6c065b7b6ad256fae945551005156412073 (diff)
Introduce APIs for RTT calls (part 1)
Add signaling methods and data pipes for handling real-time text during a call. Change-Id: I876827c448252c5f786d7a4919c47891acb03877 Test: manual, through telecom testapps
Diffstat (limited to 'telecomm/java/android/telecom/InCallAdapter.java')
-rw-r--r--telecomm/java/android/telecom/InCallAdapter.java46
1 files changed, 45 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/InCallAdapter.java b/telecomm/java/android/telecom/InCallAdapter.java
index 3f270d9c5829..d640b1dd6022 100644
--- a/telecomm/java/android/telecom/InCallAdapter.java
+++ b/telecomm/java/android/telecom/InCallAdapter.java
@@ -34,7 +34,7 @@ import java.util.List;
* <p>
* The adapter will stop functioning when there are no more calls.
*
- * {@hide}
+ * @hide
*/
public final class InCallAdapter {
private final IInCallAdapter mAdapter;
@@ -375,4 +375,48 @@ public final class InCallAdapter {
} catch (RemoteException ignored) {
}
}
+
+ /**
+ * Sends an RTT upgrade request to the remote end of the connection.
+ */
+ public void sendRttRequest() {
+ try {
+ mAdapter.sendRttRequest();
+ } catch (RemoteException ignored) {
+ }
+ }
+
+ /**
+ * Responds to an RTT upgrade request initiated from the remote end.
+ *
+ * @param id the ID of the request as specified by Telecom
+ * @param accept Whether the request should be accepted.
+ */
+ public void respondToRttRequest(int id, boolean accept) {
+ try {
+ mAdapter.respondToRttRequest(id, accept);
+ } catch (RemoteException ignored) {
+ }
+ }
+
+ /**
+ * Instructs Telecom to shut down the RTT communication channel.
+ */
+ public void stopRtt() {
+ try {
+ mAdapter.stopRtt();
+ } catch (RemoteException ignored) {
+ }
+ }
+
+ /**
+ * Sets the RTT audio mode.
+ * @param mode the desired RTT audio mode
+ */
+ public void setRttMode(int mode) {
+ try {
+ mAdapter.setRttMode(mode);
+ } catch (RemoteException ignored) {
+ }
+ }
}