diff options
| author | Jim Miller <jaggies@google.com> | 2011-10-13 16:23:28 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-13 16:23:28 -0700 |
| commit | ee12e44b77a47f9b95fcb5b484e3d1b11649fcb9 (patch) | |
| tree | 2426ca47e4d77d39765e27e507a5bf17f86e6ade | |
| parent | fb99c53308955d34b3eadae325b7ed60576836f8 (diff) | |
| parent | 6252a8b1167934d53fd76d5f0910d993390636ce (diff) | |
| download | frameworks_base-ee12e44b77a47f9b95fcb5b484e3d1b11649fcb9.zip frameworks_base-ee12e44b77a47f9b95fcb5b484e3d1b11649fcb9.tar.gz frameworks_base-ee12e44b77a47f9b95fcb5b484e3d1b11649fcb9.tar.bz2 | |
am 6252a8b1: Merge "Fix 5386408: Send accessibility event when a recent app is removed." into ics-mr0
* commit '6252a8b1167934d53fd76d5f0910d993390636ce':
Fix 5386408: Send accessibility event when a recent app is removed.
| -rw-r--r-- | packages/SystemUI/res/values/strings.xml | 3 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index e971896..65d5138 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -305,6 +305,9 @@ <!-- 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 an application has been removed from recents --> + <string name="accessibility_recents_item_dismissed"><xliff:g id="app" example="Calendar">%s</xliff:g> dismissed.</string> + <!-- Title of dialog shown when 2G-3G data usage has exceeded limit and has been disabled. [CHAR LIMIT=48] --> <string name="data_usage_disabled_dialog_3g_title">2G-3G data disabled</string> <!-- Title of dialog shown when 4G data usage has exceeded limit and has been disabled. [CHAR LIMIT=48] --> diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java index d3c4a61..8d5c33f 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java @@ -38,6 +38,7 @@ import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.view.accessibility.AccessibilityEvent; import android.view.animation.AnimationUtils; import android.widget.AdapterView; import android.widget.BaseAdapter; @@ -512,6 +513,12 @@ public class RecentsPanelView extends RelativeLayout final ActivityManager am = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE); am.removeTask(ad.persistentTaskId, ActivityManager.REMOVE_TASK_KILL_PROCESS); + + // Accessibility feedback + setContentDescription( + mContext.getString(R.string.accessibility_recents_item_dismissed, ad.getLabel())); + sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); + setContentDescription(null); } private void startApplicationDetailsActivity(String packageName) { |
