diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-10-19 14:30:15 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-19 14:30:15 -0700 |
commit | a972685b459a2cd6bf17f91c74d36dbaa99353ab (patch) | |
tree | da9b59926538607ee80c289ac9b829a0f95bcc10 | |
parent | 16f23880c0dea88539574c601c3e24d648b64527 (diff) | |
parent | bb608246b4d109a649dc147769b267acecb9416b (diff) | |
download | android_packages_apps_Trebuchet-a972685b459a2cd6bf17f91c74d36dbaa99353ab.tar.gz android_packages_apps_Trebuchet-a972685b459a2cd6bf17f91c74d36dbaa99353ab.tar.bz2 android_packages_apps_Trebuchet-a972685b459a2cd6bf17f91c74d36dbaa99353ab.zip |
am bb608246: am 40d172c1: am 303f621e: Merge "Send correctly populated Accessibility event on Launcher state change." into jb-mr1-dev
* commit 'bb608246b4d109a649dc147769b267acecb9416b':
Send correctly populated Accessibility event on Launcher state change.
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 2c5f2b55c..56fdbb60c 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -2784,8 +2784,9 @@ public final class Launcher extends Activity mUserPresent = true; updateRunning(); - // send an accessibility event to announce the context change - getWindow().getDecorView().sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); + // Send an accessibility event to announce the context change + getWindow().getDecorView() + .sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED); } void showAllApps(boolean animated) { @@ -2803,7 +2804,8 @@ public final class Launcher extends Activity closeFolder(); // Send an accessibility event to announce the context change - getWindow().getDecorView().sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); + getWindow().getDecorView() + .sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED); } void enterSpringLoadedDragMode() { @@ -3177,10 +3179,15 @@ public final class Launcher extends Activity @Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { - boolean result = super.dispatchPopulateAccessibilityEvent(event); + final boolean result = super.dispatchPopulateAccessibilityEvent(event); final List<CharSequence> text = event.getText(); text.clear(); - text.add(getString(R.string.home)); + // Populate event with a fake title based on the current state. + if (mState == State.APPS_CUSTOMIZE) { + text.add(getString(R.string.all_apps_button_label)); + } else { + text.add(getString(R.string.all_apps_home_button_label)); + } return result; } |