diff options
author | wangqi <wangqi@google.com> | 2018-03-05 16:41:45 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-05 16:42:42 -0800 |
commit | 0d907de3f871463e15bc051bd1a2f3dfd5ffb496 (patch) | |
tree | e15981ddc5b7a4fdcc807fb365ca58f6eb33d75b /java/com/android/incallui/rtt/impl/RttOverflowMenu.java | |
parent | 74b03c70e149d91c527245849fe663ce3e03ae7a (diff) |
Add support for bluetooth etc. audio route for RTT call.
Bug: 67596257
Test: manual
PiperOrigin-RevId: 187944752
Change-Id: I2bbe45d2bda22bb000239f8613576fffb9f6ab28
Diffstat (limited to 'java/com/android/incallui/rtt/impl/RttOverflowMenu.java')
-rw-r--r-- | java/com/android/incallui/rtt/impl/RttOverflowMenu.java | 12 |
1 files changed, 12 insertions, 0 deletions
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); } } } |