From 6b929c026e2d7d9b4fb4ec401829431e817c8606 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Thu, 4 Dec 2014 09:24:03 -0800 Subject: Fixing manage conference accessibility issues. 1. The "Manage Conference" button would be announced twice when it received focus. Moved content description to the parent FrameLayout that acts as the button and made it focusable to ensure that the description is read only a single time. 2. When tapping "Manage Conference" button there was no audible feedback that the manage conference screen was opened. Set focus to the list of conference participants so that this list is announced when the manage conference screen opens. 3. It was possible to change focus from the list of participants in the manage conference screen to the call card buttons and other elements behind the manage conference screen. Fixed by explicitly setting the call card fragment visibility to GONE when the conference manager is shown. Bug: 18440532 Change-Id: I0ce4f74ccb98c5cefd6c6e75eb8ef9310bd6d7fb --- InCallUI/res/layout/conference_manager_fragment.xml | 5 +++-- InCallUI/res/layout/manage_conference_call_button.xml | 13 ++++++++----- .../src/com/android/incallui/ConferenceManagerFragment.java | 3 +++ InCallUI/src/com/android/incallui/InCallActivity.java | 7 ++++++- 4 files changed, 20 insertions(+), 8 deletions(-) (limited to 'InCallUI') diff --git a/InCallUI/res/layout/conference_manager_fragment.xml b/InCallUI/res/layout/conference_manager_fragment.xml index 5aed520b7..8e55ad762 100644 --- a/InCallUI/res/layout/conference_manager_fragment.xml +++ b/InCallUI/res/layout/conference_manager_fragment.xml @@ -23,7 +23,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="@dimen/conference_call_manager_padding_top" - android:clickable="true" android:visibility="gone"> @@ -33,5 +32,7 @@ android:layout_height="match_parent" android:listSelector="@null" android:background="@color/background_dialer_white" - android:divider="@null" /> + android:divider="@null" + android:focusableInTouchMode="true" + android:focusable="true"/> diff --git a/InCallUI/res/layout/manage_conference_call_button.xml b/InCallUI/res/layout/manage_conference_call_button.xml index e9de926fd..3b5ef9931 100644 --- a/InCallUI/res/layout/manage_conference_call_button.xml +++ b/InCallUI/res/layout/manage_conference_call_button.xml @@ -15,12 +15,14 @@ ~ limitations under the License --> - + + android:background="@color/incall_banner_secondary_background_color" + android:focusable="true" + android:contentDescription="@string/onscreenManageConferenceText"> + android:paddingEnd="16dp" + android:importantForAccessibility="no" /> + android:text="@string/onscreenManageConferenceText" + android:importantForAccessibility="no" /> diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerFragment.java b/InCallUI/src/com/android/incallui/ConferenceManagerFragment.java index c25a1ab4b..163954b2d 100644 --- a/InCallUI/src/com/android/incallui/ConferenceManagerFragment.java +++ b/InCallUI/src/com/android/incallui/ConferenceManagerFragment.java @@ -92,6 +92,9 @@ public class ConferenceManagerFragment final CallList calls = CallList.getInstance(); getPresenter().init(getActivity(), calls); getView().setVisibility(View.VISIBLE); + // Request focus on the list of participants for accessibility purposes. This ensures + // that once the list of participants is shown, the first participant is announced. + mConferenceParticipantList.requestFocus(); } else { getView().setVisibility(View.GONE); diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 3f9cd9827..00bcad824 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -319,7 +319,7 @@ public class InCallActivity extends Activity { // BACK is also used to exit out of any "special modes" of the // in-call UI: - if (!mCallCardFragment.isVisible()) { + if (!mConferenceManagerFragment.isVisible() && !mCallCardFragment.isVisible()) { return; } @@ -328,6 +328,7 @@ public class InCallActivity extends Activity { return; } else if (mConferenceManagerFragment.isVisible()) { mConferenceManagerFragment.setVisible(false); + mCallCardFragment.getView().setVisibility(View.VISIBLE); return; } @@ -682,6 +683,10 @@ public class InCallActivity extends Activity { public void showConferenceCallManager() { mConferenceManagerFragment.setVisible(true); + + // Need to hide the call card fragment to ensure that accessibility service does not try to + // give focus to the call card when the conference manager is visible. + mCallCardFragment.getView().setVisibility(View.GONE); } public void showPostCharWaitDialog(String callId, String chars) { -- cgit v1.2.3