diff options
author | wangqi <wangqi@google.com> | 2018-03-22 14:32:23 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-26 22:15:53 -0700 |
commit | 009695e477f02b13d563f17a8de0e179d7715bf9 (patch) | |
tree | 14522ec26099cd06ae4a0149b21a2e24ae6ed8d6 /java/com/android/incallui/rtt/impl/RttChatFragment.java | |
parent | cdae908f0a3c3754c592996df092722e1a96bde3 (diff) |
Add waiting for join banner to RTT outgoing call.
Bug: 67596257
Test: manual
PiperOrigin-RevId: 190126654
Change-Id: I412f8fbf5b345005f9fb3651c345303d965e4e02
Diffstat (limited to 'java/com/android/incallui/rtt/impl/RttChatFragment.java')
-rw-r--r-- | java/com/android/incallui/rtt/impl/RttChatFragment.java | 18 |
1 files changed, 18 insertions, 0 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 |