summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2012-06-20 16:52:16 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-06-20 16:52:16 -0700
commitdce5af632ce8899905fbf187b9505f6753d5a562 (patch)
tree7d400f47811ca0190285f60da634d23f703cf048
parentbd6b1820d931ef11fc7fc5b8571a8265c1ed4994 (diff)
parent78bfb9829561876137c62ca1fff13760bfc77472 (diff)
downloadframeworks_base-dce5af632ce8899905fbf187b9505f6753d5a562.zip
frameworks_base-dce5af632ce8899905fbf187b9505f6753d5a562.tar.gz
frameworks_base-dce5af632ce8899905fbf187b9505f6753d5a562.tar.bz2
Merge "Fix GlowPadView accessibility behavior." into jb-dev
-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"