summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/com/android/incallui/rtt/impl/RttChatFragment.java18
-rw-r--r--java/com/android/incallui/rtt/impl/res/layout/rtt_banner.xml10
-rw-r--r--java/com/android/incallui/rtt/impl/res/values/strings.xml5
3 files changed, 32 insertions, 1 deletions
diff --git a/java/com/android/incallui/rtt/impl/RttChatFragment.java b/java/com/android/incallui/rtt/impl/RttChatFragment.java
index e14ee9b06..56ac2429c 100644
--- a/java/com/android/incallui/rtt/impl/RttChatFragment.java
+++ b/java/com/android/incallui/rtt/impl/RttChatFragment.java
@@ -103,6 +103,8 @@ public class RttChatFragment extends Fragment
private boolean isTimerStarted;
private RttOverflowMenu overflowMenu;
private SecondaryInfo savedSecondaryInfo;
+ private TextView statusBanner;
+ private PrimaryInfo primaryInfo;
/**
* Create a new instance of RttChatFragment.
@@ -221,6 +223,7 @@ public class RttChatFragment extends Fragment
nameTextView = view.findViewById(R.id.rtt_name_or_number);
chronometer = view.findViewById(R.id.rtt_timer);
+ statusBanner = view.findViewById(R.id.rtt_status_banner);
return view;
}
@@ -334,6 +337,7 @@ public class RttChatFragment extends Fragment
public void setPrimary(@NonNull PrimaryInfo primaryInfo) {
LogUtil.i("RttChatFragment.setPrimary", primaryInfo.toString());
nameTextView.setText(primaryInfo.name());
+ this.primaryInfo = primaryInfo;
}
@Override
@@ -381,6 +385,20 @@ public class RttChatFragment extends Fragment
chronometer.start();
isTimerStarted = true;
}
+ if (primaryCallState.state() == State.DIALING) {
+ showWaitingForJoinBanner();
+ } else {
+ hideWaitingForJoinBanner();
+ }
+ }
+
+ private void showWaitingForJoinBanner() {
+ statusBanner.setText(getString(R.string.rtt_status_banner_text, primaryInfo.name()));
+ statusBanner.setVisibility(View.VISIBLE);
+ }
+
+ private void hideWaitingForJoinBanner() {
+ statusBanner.setVisibility(View.GONE);
}
@Override
diff --git a/java/com/android/incallui/rtt/impl/res/layout/rtt_banner.xml b/java/com/android/incallui/rtt/impl/res/layout/rtt_banner.xml
index c4d3a4290..d62cf1849 100644
--- a/java/com/android/incallui/rtt/impl/res/layout/rtt_banner.xml
+++ b/java/com/android/incallui/rtt/impl/res/layout/rtt_banner.xml
@@ -83,5 +83,15 @@
android:id="@id/rtt_on_hold_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
+ <TextView
+ android:id="@+id/rtt_status_banner"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:background="@android:color/white"
+ android:gravity="center_vertical"
+ android:textColor="#DD000000"
+ android:textSize="14sp"/>
</LinearLayout> \ No newline at end of file
diff --git a/java/com/android/incallui/rtt/impl/res/values/strings.xml b/java/com/android/incallui/rtt/impl/res/values/strings.xml
index dce16fdda..b0ac2057e 100644
--- a/java/com/android/incallui/rtt/impl/res/values/strings.xml
+++ b/java/com/android/incallui/rtt/impl/res/values/strings.xml
@@ -14,7 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<resources>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Content description for submit chat input button. [CHAR LIMIT=NONE] -->
<string name="content_description_rtt_check_button">Go ahead</string>
@@ -27,4 +27,7 @@
<!-- Text for back button. [CHAR LIMIT=20] -->
<string name="rtt_button_back">Back</string>
+ <!-- Text for status banner. [CHAT LIMIT=100] -->
+ <string name="rtt_status_banner_text">Waiting for <xliff:g id="name">%s</xliff:g> to join RTT call&#8230;</string>
+
</resources> \ No newline at end of file