summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionRequest.java
diff options
context:
space:
mode:
authorHall Liu <hallliu@google.com>2018-02-09 16:40:03 -0800
committerHall Liu <hallliu@google.com>2018-02-22 03:19:19 +0000
commite9041241deb8623b7594a02b34795caa389ae2ff (patch)
tree7e46a47045e194607ed596b963ddb33f5b83ddd6 /telecomm/java/android/telecom/ConnectionRequest.java
parent47e1d11b479e9909b4a425a5dd5d040b18ad3f53 (diff)
RTT bugfixes, part 5
* Add a new API to allow Telecom to inform ConnectionServices when the RTT text stream changes * No longer set the RTT property from ConnectionService. Client apps should be setting properties themselves. * Add Dialer-side RTT property in order to remove the dependence on checking the RTT streams, which have a complex lifecycle Bug: 72951201 Bug: 72648661 Test: manual, with real RTT calls and Dialer's SimulatorConnection, also cts Change-Id: Ic4c7d883d2dc6baf8e8c0eaa4df58d7de8762b9e Merged-In: Ic4c7d883d2dc6baf8e8c0eaa4df58d7de8762b9e
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionRequest.java')
-rw-r--r--telecomm/java/android/telecom/ConnectionRequest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/ConnectionRequest.java b/telecomm/java/android/telecom/ConnectionRequest.java
index 658b4734b0b5..b6e6b0ed8270 100644
--- a/telecomm/java/android/telecom/ConnectionRequest.java
+++ b/telecomm/java/android/telecom/ConnectionRequest.java
@@ -143,6 +143,8 @@ public final class ConnectionRequest implements Parcelable {
private final boolean mShouldShowIncomingCallUi;
private final ParcelFileDescriptor mRttPipeToInCall;
private final ParcelFileDescriptor mRttPipeFromInCall;
+ // Cached return value of getRttTextStream -- we don't want to wrap it more than once.
+ private Connection.RttTextStream mRttTextStream;
/**
* @param accountHandle The accountHandle which should be used to place the call.
@@ -312,7 +314,10 @@ public final class ConnectionRequest implements Parcelable {
*/
public Connection.RttTextStream getRttTextStream() {
if (isRequestingRtt()) {
- return new Connection.RttTextStream(mRttPipeToInCall, mRttPipeFromInCall);
+ if (mRttTextStream == null) {
+ mRttTextStream = new Connection.RttTextStream(mRttPipeToInCall, mRttPipeFromInCall);
+ }
+ return mRttTextStream;
} else {
return null;
}