From 0d907de3f871463e15bc051bd1a2f3dfd5ffb496 Mon Sep 17 00:00:00 2001 From: wangqi Date: Mon, 5 Mar 2018 16:41:45 -0800 Subject: Add support for bluetooth etc. audio route for RTT call. Bug: 67596257 Test: manual PiperOrigin-RevId: 187944752 Change-Id: I2bbe45d2bda22bb000239f8613576fffb9f6ab28 --- java/com/android/incallui/rtt/impl/RttOverflowMenu.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'java') diff --git a/java/com/android/incallui/rtt/impl/RttOverflowMenu.java b/java/com/android/incallui/rtt/impl/RttOverflowMenu.java index e0916bedf..2b56364be 100644 --- a/java/com/android/incallui/rtt/impl/RttOverflowMenu.java +++ b/java/com/android/incallui/rtt/impl/RttOverflowMenu.java @@ -63,6 +63,7 @@ public class RttOverflowMenu extends PopupWindow implements OnCheckedChangeListe } else if (button == addCallButton) { inCallButtonUiDelegate.addCallClicked(); } + dismiss(); } void setMuteButtonChecked(boolean isChecked) { @@ -73,6 +74,17 @@ public class RttOverflowMenu extends PopupWindow implements OnCheckedChangeListe SpeakerButtonInfo info = new SpeakerButtonInfo(audioState, IconSize.SIZE_24_DP); if (info.checkable) { speakerButton.setChecked(info.isChecked); + speakerButton.setOnClickListener(null); + speakerButton.setOnCheckedChangeListener(this); + } else { + speakerButton.setText(info.label); + speakerButton.setCompoundDrawablesWithIntrinsicBounds(info.icon, 0, 0, 0); + speakerButton.setOnClickListener( + v -> { + inCallButtonUiDelegate.showAudioRouteSelector(); + dismiss(); + }); + speakerButton.setOnCheckedChangeListener(null); } } } -- cgit v1.2.3