Add further Connection-side APIs for RTT (part 2)
Add methods and callbacks to facilitate local and remote RTT initiation
and termination in the middle of a call. Adds @hide Connection-side APIs
to communicate with the ConnectionService, as well as plumbing for
RemoteConnections.
Test: manual, through telecom testapps
Change-Id: Ia80604b7dff8586ff222dbccdbe55e91aab02178
diff --git a/telecomm/java/android/telecom/InCallAdapter.java b/telecomm/java/android/telecom/InCallAdapter.java
index d640b1d..9559a28 100644
--- a/telecomm/java/android/telecom/InCallAdapter.java
+++ b/telecomm/java/android/telecom/InCallAdapter.java
@@ -379,9 +379,9 @@
/**
* Sends an RTT upgrade request to the remote end of the connection.
*/
- public void sendRttRequest() {
+ public void sendRttRequest(String callId) {
try {
- mAdapter.sendRttRequest();
+ mAdapter.sendRttRequest(callId);
} catch (RemoteException ignored) {
}
}
@@ -392,9 +392,9 @@
* @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) {
+ public void respondToRttRequest(String callId, int id, boolean accept) {
try {
- mAdapter.respondToRttRequest(id, accept);
+ mAdapter.respondToRttRequest(callId, id, accept);
} catch (RemoteException ignored) {
}
}
@@ -402,9 +402,9 @@
/**
* Instructs Telecom to shut down the RTT communication channel.
*/
- public void stopRtt() {
+ public void stopRtt(String callId) {
try {
- mAdapter.stopRtt();
+ mAdapter.stopRtt(callId);
} catch (RemoteException ignored) {
}
}
@@ -413,9 +413,9 @@
* Sets the RTT audio mode.
* @param mode the desired RTT audio mode
*/
- public void setRttMode(int mode) {
+ public void setRttMode(String callId, int mode) {
try {
- mAdapter.setRttMode(mode);
+ mAdapter.setRttMode(callId, mode);
} catch (RemoteException ignored) {
}
}