From 16a215c34b11744543f0bce8407a40a442a27f6b Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Tue, 1 Mar 2016 14:49:20 -0800 Subject: Provide better talkback for buttons in calling. 1. Announce "unmute" if the mute button is checked 2. Annouce "hide dialpad" if the show dialpad button is checked. Bug: 24296610 Change-Id: Idc3b78e49ca5ef2c01b2ab671b5e34ba54cc4f4e --- InCallUI/res/layout/call_button_fragment.xml | 4 ++-- InCallUI/res/values/strings.xml | 16 ++++++++++++---- .../src/com/android/incallui/CallButtonFragment.java | 6 ++++++ 3 files changed, 20 insertions(+), 6 deletions(-) (limited to 'InCallUI') diff --git a/InCallUI/res/layout/call_button_fragment.xml b/InCallUI/res/layout/call_button_fragment.xml index db7576404..6dbfbf73a 100644 --- a/InCallUI/res/layout/call_button_fragment.xml +++ b/InCallUI/res/layout/call_button_fragment.xml @@ -75,7 +75,7 @@ + android:contentDescription="@string/onscreenMuteText_unselected" /> @@ -83,7 +83,7 @@ + android:contentDescription="@string/onscreenShowDialpadText_unselected" /> diff --git a/InCallUI/res/values/strings.xml b/InCallUI/res/values/strings.xml index 2f3d16b73..57a1b5389 100644 --- a/InCallUI/res/values/strings.xml +++ b/InCallUI/res/values/strings.xml @@ -275,10 +275,18 @@ Resume Call End Call - - Dialpad - - Mute + + Show Dialpad + + Hide Dialpad + + Mute + + Unmute Add call diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java index 9859f4e7b..5a25b6a7b 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -433,6 +433,9 @@ public class CallButtonFragment public void setMute(boolean value) { if (mMuteButton.isSelected() != value) { mMuteButton.setSelected(value); + mMuteButton.setContentDescription(getContext().getString( + value ? R.string.onscreenMuteText_selected + : R.string.onscreenMuteText_unselected)); } } @@ -789,6 +792,9 @@ public class CallButtonFragment boolean changed = ((InCallActivity) getActivity()).showDialpadFragment(value, animate); if (changed) { mShowDialpadButton.setSelected(value); + mShowDialpadButton.setContentDescription(getContext().getString( + value /* show */ ? R.string.onscreenShowDialpadText_unselected + : R.string.onscreenShowDialpadText_selected)); } } } -- cgit v1.2.3