diff options
author | Jason Monk <jmonk@google.com> | 2014-04-24 16:33:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-24 16:33:07 +0000 |
commit | 031d0ff4ad4baeb548c4272a08af4e8844cb5fbe (patch) | |
tree | 73d09b3a7c7b5e6407a216d91b74882dffa39b15 /src/com/android/launcher3 | |
parent | 94904606f6961816429fa4f5a15ac3ba3785a4f8 (diff) | |
parent | ed05f09aa1f83fc7ed02c8c40fa473a7f1a3a1e0 (diff) | |
download | android_packages_apps_Trebuchet-031d0ff4ad4baeb548c4272a08af4e8844cb5fbe.tar.gz android_packages_apps_Trebuchet-031d0ff4ad4baeb548c4272a08af4e8844cb5fbe.tar.bz2 android_packages_apps_Trebuchet-031d0ff4ad4baeb548c4272a08af4e8844cb5fbe.zip |
Merge "Fix accessibility announce on apps page" into ub-now-nova
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/AppsCustomizeTabHost.java | 9 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/launcher3/AppsCustomizeTabHost.java b/src/com/android/launcher3/AppsCustomizeTabHost.java index bb7f045ce..c6455c2fe 100644 --- a/src/com/android/launcher3/AppsCustomizeTabHost.java +++ b/src/com/android/launcher3/AppsCustomizeTabHost.java @@ -29,6 +29,7 @@ import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.view.accessibility.AccessibilityManager; import android.widget.FrameLayout; import android.widget.LinearLayout; import android.widget.TabHost; @@ -430,6 +431,14 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona // prevent slowing down the animation) mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage()); + // Opening apps, need to announce what page we are on. + AccessibilityManager am = (AccessibilityManager) + getContext().getSystemService(Context.ACCESSIBILITY_SERVICE); + if (am.isEnabled()) { + // Notify the user when the page changes + announceForAccessibility(mAppsCustomizePane.getCurrentPageDescription()); + } + // Going from Workspace -> All Apps // NOTE: We should do this at the end since we check visibility state in some of the // cling initialization/dismiss code above. diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 9800cf376..2c57422c5 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1466,6 +1466,14 @@ public class Workspace extends SmoothPagedView mWallpaperOffset.syncWithScroll(); } + @Override + public void announceForAccessibility(CharSequence text) { + // Don't announce if apps is on top of us. + if (!mLauncher.isAllAppsVisible()) { + super.announceForAccessibility(text); + } + } + void showOutlines() { if (!isSmall() && !mIsSwitchingState) { if (mChildrenOutlineFadeOutAnimation != null) mChildrenOutlineFadeOutAnimation.cancel(); |