diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-03-06 02:04:09 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-03-06 02:04:09 +0000 |
commit | 46e320ea35784f52dfe4049c9e0a330490aed315 (patch) | |
tree | e15981ddc5b7a4fdcc807fb365ca58f6eb33d75b /java/com/android | |
parent | 74b03c70e149d91c527245849fe663ce3e03ae7a (diff) | |
parent | 0d907de3f871463e15bc051bd1a2f3dfd5ffb496 (diff) |
Merge "Add support for bluetooth etc. audio route for RTT call."
Diffstat (limited to 'java/com/android')
-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); } } } |