Merge "Do not set PROPERTY_IS_RTT in testapps"
diff --git a/testapps/src/com/android/server/telecom/testapps/RttChatbot.java b/testapps/src/com/android/server/telecom/testapps/RttChatbot.java
index 44439ee..920414f 100644
--- a/testapps/src/com/android/server/telecom/testapps/RttChatbot.java
+++ b/testapps/src/com/android/server/telecom/testapps/RttChatbot.java
@@ -116,7 +116,12 @@
         mHandler = new ReplyHandler(ht.getLooper());
         mReceiverThread = new Thread(() -> {
             while (true) {
-                String charsReceived = mRttTextStream.read();
+                String charsReceived;
+                try {
+                    charsReceived = mRttTextStream.read();
+                } catch (IOException e) {
+                    break;
+                }
                 if (charsReceived == null) {
                     if (Thread.currentThread().isInterrupted()) {
                         Log.w(LOG_TAG, "Thread interrupted");
diff --git a/testapps/src/com/android/server/telecom/testapps/TestConnectionService.java b/testapps/src/com/android/server/telecom/testapps/TestConnectionService.java
index 71af9a8..ac239b9 100644
--- a/testapps/src/com/android/server/telecom/testapps/TestConnectionService.java
+++ b/testapps/src/com/android/server/telecom/testapps/TestConnectionService.java
@@ -286,7 +286,6 @@
             if (rttTextStream != null) {
                 mRttChatbot = new RttChatbot(getApplicationContext(), rttTextStream);
                 mRttChatbot.start();
-                setConnectionProperties(getConnectionProperties() | PROPERTY_IS_RTT);
                 sendRttInitiationSuccess();
             }
         }
@@ -298,7 +297,6 @@
                 Log.i(this, "Accepting RTT request.");
                 mRttChatbot = new RttChatbot(getApplicationContext(), textStream);
                 mRttChatbot.start();
-                setConnectionProperties(getConnectionProperties() | PROPERTY_IS_RTT);
                 sendRttInitiationSuccess();
             } else {
                 sendRttInitiationFailure(RttModifyStatus.SESSION_MODIFY_REQUEST_FAIL);
diff --git a/testapps/src/com/android/server/telecom/testapps/TestRttActivity.java b/testapps/src/com/android/server/telecom/testapps/TestRttActivity.java
index 9bb6977..b78a48a 100644
--- a/testapps/src/com/android/server/telecom/testapps/TestRttActivity.java
+++ b/testapps/src/com/android/server/telecom/testapps/TestRttActivity.java
@@ -93,7 +93,12 @@
                     }
                     // inner read loop
                     while (true) {
-                        String receivedText = rttCall.read();
+                        String receivedText;
+                        try {
+                            receivedText = rttCall.read();
+                        } catch (IOException e) {
+                            break;
+                        }
                         if (receivedText == null) {
                             if (Thread.currentThread().isInterrupted()) {
                                 break begin;