summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-07-25 12:10:38 -0700
committerWinson Chung <winsonc@google.com>2014-07-25 19:12:28 +0000
commita4cc966050aeb406dbf3d9d262e281c40826e354 (patch)
treeb3769baa89f264b9d0b3e6eda412364f38638ea5
parent48e28ad06cb2cb30d3c327b0215c15dd4843fb6f (diff)
downloadframeworks_base-a4cc966050aeb406dbf3d9d262e281c40826e354.zip
frameworks_base-a4cc966050aeb406dbf3d9d262e281c40826e354.tar.gz
frameworks_base-a4cc966050aeb406dbf3d9d262e281c40826e354.tar.bz2
Adding content description for task view buttons.
-rw-r--r--packages/SystemUI/res/values/colors.xml2
-rw-r--r--packages/SystemUI/res/values/strings.xml4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java4
4 files changed, 11 insertions, 3 deletions
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index e9fe09e..5ecba32 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -62,7 +62,7 @@
<!-- The recents task bar light dismiss icon color to be drawn on top of dark backgrounds. -->
<color name="recents_task_bar_light_dismiss_color">#ffeeeeee</color>
<!-- The recents task bar dark dismiss icon color to be drawn on top of light backgrounds. -->
- <color name="recents_task_bar_dark_dismiss_color">#cc000000</color>
+ <color name="recents_task_bar_dark_dismiss_color">#99000000</color>
<!-- The recents task bar highlight color. -->
<color name="recents_task_bar_highlight_color">#28ffffff</color>
<!-- The lock to task button background color. -->
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 5d4b536..ddbddd1 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -380,8 +380,12 @@
<!-- Content description of the ringer silent icon in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_ringer_silent">Ringer silent.</string>
+ <!-- Content description to tell the user that this button will remove an application from recents -->
+ <string name="accessibility_recents_item_will_be_dismissed">Dismiss <xliff:g id="app" example="Calendar">%s</xliff:g>.</string>
<!-- Content description to tell the user an application has been removed from recents -->
<string name="accessibility_recents_item_dismissed"><xliff:g id="app" example="Calendar">%s</xliff:g> dismissed.</string>
+ <!-- Content description to tell the user an application has been launched from recents -->
+ <string name="accessibility_recents_item_launched">Starting <xliff:g id="app" example="Calendar">%s</xliff:g>.</string>
<!-- Content description to tell the user a notification has been removed from the notification shade -->
<string name="accessibility_notification_dismissed">Notification dismissed.</string>
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java
index fd636ed..dc8f0db 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java
@@ -163,6 +163,7 @@ class TaskBarView extends FrameLayout {
} else if (t.applicationIcon != null) {
mApplicationIcon.setImageDrawable(t.applicationIcon);
}
+ mApplicationIcon.setContentDescription(t.activityLabel);
if (!mActivityDescription.getText().toString().equals(t.activityLabel)) {
mActivityDescription.setText(t.activityLabel);
}
@@ -176,6 +177,9 @@ class TaskBarView extends FrameLayout {
mConfig.taskBarViewLightTextColor : mConfig.taskBarViewDarkTextColor);
mDismissButton.setImageDrawable(t.useLightOnPrimaryColor ?
mLightDismissDrawable : mDarkDismissDrawable);
+ mDismissButton.setContentDescription(
+ getContext().getString(R.string.accessibility_recents_item_will_be_dismissed,
+ t.activityLabel));
}
/** Unbinds the bar view from the task */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index 32b9d8a..f7f96da 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -27,12 +27,12 @@ import android.graphics.Rect;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
import android.widget.FrameLayout;
import android.widget.OverScroller;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsConfiguration;
-import com.android.systemui.recents.misc.Console;
import com.android.systemui.recents.misc.DozeTrigger;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.Utilities;
@@ -1045,4 +1045,4 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
}
}
}
-} \ No newline at end of file
+}