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
This commit is contained in:
Hall Liu
2017-02-06 10:49:48 -08:00
parent 78eed31d2d
commit 57006aa82a
17 changed files with 670 additions and 20 deletions

View File

@@ -379,9 +379,9 @@ public final class InCallAdapter {
/**
* 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 @@ public final class InCallAdapter {
* @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 @@ public final class InCallAdapter {
/**
* 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 @@ public final class InCallAdapter {
* 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) {
}
}