summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralanv <alanv@google.com>2012-06-20 12:10:48 -0700
committeralanv <alanv@google.com>2012-06-20 13:22:45 -0700
commit78bfb9829561876137c62ca1fff13760bfc77472 (patch)
tree361d4385a8e2553876b27b0b967d8b444f8d38ca
parent56802678a72157675382910e37857cf78e1cefcb (diff)
downloadframeworks_base-78bfb9829561876137c62ca1fff13760bfc77472.zip
frameworks_base-78bfb9829561876137c62ca1fff13760bfc77472.tar.gz
frameworks_base-78bfb9829561876137c62ca1fff13760bfc77472.tar.bz2
Fix GlowPadView accessibility behavior.
Bug: 6702412 Change-Id: If5ab75e77b0090a405004c66da0083e81d59deb4
-rw-r--r--core/java/com/android/internal/widget/multiwaveview/GlowPadView.java14
-rw-r--r--core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml1
-rw-r--r--core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml1
-rw-r--r--core/res/res/layout/keyguard_screen_tab_unlock.xml1
-rw-r--r--core/res/res/layout/keyguard_screen_tab_unlock_land.xml1
5 files changed, 8 insertions, 10 deletions
diff --git a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
index 62410ed..4e60b75 100644
--- a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
@@ -881,7 +881,7 @@ public class GlowPadView extends View {
}
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
String targetContentDescription = getTargetDescription(activeTarget);
- announceText(targetContentDescription);
+ announceForAccessibility(targetContentDescription);
}
}
}
@@ -1089,16 +1089,10 @@ public class GlowPadView extends View {
String text = String.format(directionDescription, targetDescription);
utterance.append(text);
}
- if (utterance.length() > 0) {
- announceText(utterance.toString());
- }
}
- }
-
- private void announceText(String text) {
- setContentDescription(text);
- sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED);
- setContentDescription(null);
+ if (utterance.length() > 0) {
+ announceForAccessibility(utterance.toString());
+ }
}
private String getTargetDescription(int index) {
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
index 356e7cf..af7d011 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
@@ -89,6 +89,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
+ android:focusable="true"
android:targetDrawables="@array/lockscreen_targets_with_camera"
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
index cb1cb21..9c18b7e 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
@@ -89,6 +89,7 @@
android:layout_rowSpan="7"
android:layout_gravity="center_vertical|right"
android:gravity="center"
+ android:focusable="true"
android:targetDrawables="@array/lockscreen_targets_with_camera"
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock.xml b/core/res/res/layout/keyguard_screen_tab_unlock.xml
index 91f65e9..81166222 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock.xml
@@ -130,6 +130,7 @@
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:gravity="top"
+ android:focusable="true"
android:targetDrawables="@array/lockscreen_targets_with_camera"
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
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 8b9d8e4..35e4d11 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
@@ -135,6 +135,7 @@
android:layout_height="match_parent"
android:layout_rowSpan="7"
android:gravity="left|center_vertical"
+ android:focusable="true"
android:targetDrawables="@array/lockscreen_targets_with_camera"
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"