diff options
Diffstat (limited to '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); } } } |