From 57df88bc94f9aa06450e158b5a59ec29e3fe8874 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Tue, 30 Aug 2011 17:37:05 -0700 Subject: Cleaning up the accessibility of MultiWaveView Change-Id: I13bd71670b38a917d62118ddef5ed6982c9eba99 --- .../internal/widget/multiwaveview/MultiWaveView.java | 10 +++++----- core/res/res/layout/keyguard_screen_tab_unlock.xml | 2 +- core/res/res/layout/keyguard_screen_tab_unlock_land.xml | 2 +- core/res/res/values-land/arrays.xml | 16 +--------------- core/res/res/values/arrays.xml | 16 +--------------- core/res/res/values/strings.xml | 8 ++++---- 6 files changed, 13 insertions(+), 41 deletions(-) diff --git a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java index 76bc535..cd1f8ba 100644 --- a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java +++ b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java @@ -902,13 +902,13 @@ public class MultiWaveView extends View { String directionDescription = getDirectionDescription(i); if (!TextUtils.isEmpty(targetDescription) && !TextUtils.isEmpty(directionDescription)) { - utterance.append(targetDescription); - utterance.append(" "); - utterance.append(directionDescription); - utterance.append("."); + String text = String.format(directionDescription, targetDescription); + utterance.append(text); + } + if (utterance.length() > 0) { + announceText(utterance.toString()); } } - announceText(utterance.toString()); } private void announceText(String text) { diff --git a/core/res/res/layout/keyguard_screen_tab_unlock.xml b/core/res/res/layout/keyguard_screen_tab_unlock.xml index 4c8c0d1..0368530 100644 --- a/core/res/res/layout/keyguard_screen_tab_unlock.xml +++ b/core/res/res/layout/keyguard_screen_tab_unlock.xml @@ -131,7 +131,7 @@ android:targetDrawables="@array/lockscreen_targets_with_camera" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" - android:directionDescriptions="@array/lockscreen_direction_descriptions_with_camera" + android:directionDescriptions="@array/lockscreen_direction_descriptions" android:handleDrawable="@drawable/ic_lockscreen_handle" android:waveDrawable="@drawable/ic_lockscreen_outerring" android:outerRadius="@dimen/multiwaveview_target_placement_radius" diff --git a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml index ba55f0c0..2849376 100644 --- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml +++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml @@ -136,7 +136,7 @@ android:targetDrawables="@array/lockscreen_targets_with_camera" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" - android:directionDescriptions="@array/lockscreen_direction_descriptions_with_camera" + android:directionDescriptions="@array/lockscreen_direction_descriptions" android:handleDrawable="@drawable/ic_lockscreen_handle" android:waveDrawable="@drawable/ic_lockscreen_outerring" android:outerRadius="@dimen/multiwaveview_target_placement_radius" diff --git a/core/res/res/values-land/arrays.xml b/core/res/res/values-land/arrays.xml index 57aafc8..68e5cfd 100644 --- a/core/res/res/values-land/arrays.xml +++ b/core/res/res/values-land/arrays.xml @@ -34,7 +34,7 @@ @string/description_target_soundon - + @null @string/description_direction_up @null @@ -55,13 +55,6 @@ @string/description_target_silent - - @null - @string/description_direction_up - @null - @string/description_direction_down - - @null @drawable/ic_lockscreen_unlock @@ -76,11 +69,4 @@ @string/description_target_camera - - @null - @string/description_direction_up - @null - @string/description_direction_down - - diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml index c9043ba..8d5bd0b 100644 --- a/core/res/res/values/arrays.xml +++ b/core/res/res/values/arrays.xml @@ -356,7 +356,7 @@ @null - + @string/description_direction_right @null @string/description_direction_left @@ -377,13 +377,6 @@ @null - - @string/description_direction_right - @null - @string/description_direction_left - @null - - @drawable/ic_lockscreen_unlock @null @@ -398,11 +391,4 @@ @null - - @string/description_direction_right - @null - @string/description_direction_left - @null - - diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index de10825..57b29c2 100755 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3135,13 +3135,13 @@ "Sliding handle. Tap and hold." - "Up + Up for %s. - Down + Down for %s. - "Left + "Left for %s. - Right + Right for %s. Unlock -- cgit v1.1