From fd4c9f75aa2eba3e6a896d107f05ff370c2ad2b1 Mon Sep 17 00:00:00 2001 From: wangqi Date: Thu, 8 Mar 2018 18:21:50 -0800 Subject: Add support of dialpad in RTT call. This change also dismiss overflow menu when any button is clicked inside it. Bug: 67596257 Test: manual PiperOrigin-RevId: 188424236 Change-Id: I90b803d592f12525cdb8727aaeebc45c3da5dcdd --- java/com/android/incallui/rtt/impl/RttChatFragment.java | 6 ++++-- java/com/android/incallui/rtt/impl/RttOverflowMenu.java | 4 ++++ java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml | 7 +++++++ java/com/android/incallui/rtt/protocol/RttCallScreen.java | 3 ++- 4 files changed, 17 insertions(+), 3 deletions(-) (limited to 'java/com/android/incallui/rtt') diff --git a/java/com/android/incallui/rtt/impl/RttChatFragment.java b/java/com/android/incallui/rtt/impl/RttChatFragment.java index 5094c318e..f9c91e5fb 100644 --- a/java/com/android/incallui/rtt/impl/RttChatFragment.java +++ b/java/com/android/incallui/rtt/impl/RttChatFragment.java @@ -333,11 +333,13 @@ public class RttChatFragment extends Fragment public void updateInCallScreenColors() {} @Override - public void onInCallScreenDialpadVisibilityChange(boolean isShowing) {} + public void onInCallScreenDialpadVisibilityChange(boolean isShowing) { + overflowMenu.setDialpadButtonChecked(isShowing); + } @Override public int getAnswerAndDialpadContainerResourceId() { - return 0; + return R.id.incall_dialpad_container; } @Override diff --git a/java/com/android/incallui/rtt/impl/RttOverflowMenu.java b/java/com/android/incallui/rtt/impl/RttOverflowMenu.java index 2b56364be..cca36318e 100644 --- a/java/com/android/incallui/rtt/impl/RttOverflowMenu.java +++ b/java/com/android/incallui/rtt/impl/RttOverflowMenu.java @@ -87,4 +87,8 @@ public class RttOverflowMenu extends PopupWindow implements OnCheckedChangeListe speakerButton.setOnCheckedChangeListener(null); } } + + void setDialpadButtonChecked(boolean isChecked) { + dialpadButton.setChecked(isChecked); + } } diff --git a/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml b/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml index d85075106..3194b75bc 100644 --- a/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml +++ b/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml @@ -67,4 +67,11 @@ android:tint="@color/submit_button_color"/> + \ No newline at end of file diff --git a/java/com/android/incallui/rtt/protocol/RttCallScreen.java b/java/com/android/incallui/rtt/protocol/RttCallScreen.java index 916dfb84d..531b18df6 100644 --- a/java/com/android/incallui/rtt/protocol/RttCallScreen.java +++ b/java/com/android/incallui/rtt/protocol/RttCallScreen.java @@ -17,9 +17,10 @@ package com.android.incallui.rtt.protocol; import android.support.v4.app.Fragment; +import com.android.incallui.incall.protocol.InCallScreen; /** Interface for call RTT call module. */ -public interface RttCallScreen { +public interface RttCallScreen extends InCallScreen { void onRttScreenStart(); -- cgit v1.2.3